diff --git a/distribution/distribution.go b/distribution/distribution.go index e29e384..bc9e9f3 100644 --- a/distribution/distribution.go +++ b/distribution/distribution.go @@ -1,9 +1,9 @@ package distribution import ( - domainModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/domainModels" + domainModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/domain" ) -type Distributiuon struct { +type Distributiuon struct { //TODO: Fix mistake Domains []domainModels.Domain } diff --git a/models/domainModels/domainModels.go b/models/domain/domainModels.go similarity index 92% rename from models/domainModels/domainModels.go rename to models/domain/domainModels.go index 8e3f098..c986f9a 100644 --- a/models/domainModels/domainModels.go +++ b/models/domain/domainModels.go @@ -1,4 +1,4 @@ -package distributionModels +package domainModels import ( gamesModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/games" diff --git a/models/games/fakeGames.go b/models/games/fakeGames.go deleted file mode 100644 index 4925aa2..0000000 --- a/models/games/fakeGames.go +++ /dev/null @@ -1,29 +0,0 @@ -package gamesModels - -var garrysmodGame = SteamGame{ //TODO: Move to front - GameId: "garrysmod", - SteamId: "4000", - Args: []Argument{}, - Platforms: map[string]bool{ - "linux": true, - "windows": true, - }, - Assets: GameInterfaceAssets{ - Title: "Garry's Mod", - Icon: "icon.png", - Description: "", - }, -} - -var openarena = SteamGame{ - GameId: "half-life-1", - SteamId: "70", - Args: []Argument{}, - Assets: GameInterfaceAssets{ - Title: "Half Life", - Icon: "icon.png", - Description: "asdadasd", - }, -} - -var SteamFakeGamesList = []SteamGame{garrysmodGame, openarena} diff --git a/models/games/gameTypes.go b/models/games/gameModels.go similarity index 91% rename from models/games/gameTypes.go rename to models/games/gameModels.go index a88a947..6394d3b 100644 --- a/models/games/gameTypes.go +++ b/models/games/gameModels.go @@ -24,8 +24,9 @@ type GameInterfaceBackground struct { File string } -type Games struct { +type Games struct { //TODO: to domain SteamGames []SteamGame + LocalGames []LocalGame } type JSGameInterface struct { diff --git a/models/sessions/fakeSessions.go b/models/sessions/fakeSessions.go deleted file mode 100644 index bbd5cbd..0000000 --- a/models/sessions/fakeSessions.go +++ /dev/null @@ -1,40 +0,0 @@ -package sessionsModels - -import ( - "time" - - gamesModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/games" -) - -var FakeSessions = Sessions{ //TODO: Move to front - Sessions: []Session{ - { - GameId: "garrysmod", - SessionId: "gmod-test", - // Icon: "", - // Title: "Regular Skirda Gmod server", - // Status: "Super fake session", - // Version: "", - Expires: time.Time{}, - Arguments: []gamesModels.Argument{ - { - Body: "+connect", - Value: "127.0.0.1:27015", - }, - }, - }, - { - // GameId: "half-lide-1", - // Title: "Half-Life 1 МЯСО", - // Status: "Retro shit", - Expires: time.Time{}, - }, - { - GameId: "minecraft", - // Title: "Test 3", - // Status: "Testing session", - // Version: "1.54.7", - Expires: time.Time{}, - }, - }, -} diff --git a/models/sessions/sessionTypes.go b/models/sessions/sessionModels.go similarity index 93% rename from models/sessions/sessionTypes.go rename to models/sessions/sessionModels.go index 18e8baf..e2eaefe 100644 --- a/models/sessions/sessionTypes.go +++ b/models/sessions/sessionModels.go @@ -14,7 +14,7 @@ type Session struct { Arguments []gamesModels.Argument } -type Sessions struct { +type Sessions struct { //TODO: to domain Sessions []Session } diff --git a/utils/domain/domainUtils.go b/utils/domain/domainUtils.go index 93392ea..9c3e5ff 100644 --- a/utils/domain/domainUtils.go +++ b/utils/domain/domainUtils.go @@ -1,19 +1,3 @@ package domainUtils -import ( - domainModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/domainModels" - gamesModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/games" - // sessionsModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/sessions" -) - -var fakeDomains = domainModels.Domains{ //TODO: Move to back - Domains: []domainModels.Domain{defaultDomain}, -} - -var defaultDomain = domainModels.Domain{ - DiscordGroupID: "0", - Games: gamesModels.Games{ - SteamGames: gamesModels.SteamFakeGamesList, - }, - // Sessions: sessionsModels.FakeSessions, -} +// sessionsModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/sessions"