refactoring

This commit is contained in:
cyber-dream 2023-01-05 06:47:54 +03:00
parent 2fa9396049
commit 6c6020ef94
5 changed files with 33 additions and 42 deletions

View File

@ -1,7 +1,7 @@
package distribution
import (
domainModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/domain"
domainModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/domainModels"
)
type Distributiuon struct {

View File

@ -6,11 +6,35 @@ import (
gamesModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/games"
)
var fakeSession1 = Session{
SessionId: "FakeSession1",
GameId: "fakegameid1",
Assets: gamesModels.GameInterfaceAssets{},
Expires: time.Time{},
Arguments: []gamesModels.Argument{},
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{},
},
},
}
var FakeSessions = []Session{fakeSession1}

View File

@ -1,7 +1,7 @@
package domainUtils
import (
domainModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/domain"
domainModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/domainModels"
gamesModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/games"
// sessionsModels "git.gregbrzezinski.com/Skirda/skirdagoutils/models/sessions"
)

View File

@ -41,36 +41,3 @@ func GetJSSessionInterface(s sessionsModels.Session) sessionsModels.JSSessionInt
}
return newInterface
}
var FakeSessions = sessionsModels.Sessions{ //TODO: Move to front
Sessions: []sessionsModels.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{},
},
},
}