Compare commits
No commits in common. "0dce90931c63fb589dbf28680a752424d88ffea9" and "605da815cd37039112f0d5cf8d202702123702d2" have entirely different histories.
0dce90931c
...
605da815cd
@ -2,17 +2,19 @@ package domain
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"git.gregbrzezinski.com/Skirda/skirdaGoLauncher/sharedutils/skirdasession"
|
||||
)
|
||||
|
||||
type SkirdaDomain struct {
|
||||
DomainId string
|
||||
SkirdaGames
|
||||
// skirdasession.SkirdaSessions
|
||||
skirdasession.SkirdaSessions
|
||||
}
|
||||
|
||||
func (domain SkirdaDomain) BuildDomain(newGames []SkirdaGame, newSessions []SkirdaSession) {
|
||||
func (domain SkirdaDomain) BuildDomain(newGames []SkirdaGame, newSessions []skirdasession.SkirdaSession) {
|
||||
domain.AddGames(newGames)
|
||||
// domain.AddSessions(newSessions)
|
||||
domain.AddSessions(newSessions)
|
||||
}
|
||||
|
||||
type Domains []SkirdaDomain
|
||||
@ -40,13 +42,13 @@ func (domains Domains) GetGames() SkirdaGames {
|
||||
return allGames
|
||||
}
|
||||
|
||||
// func (domains Domains) GetSessions() SkirdaSessions {
|
||||
// plainSessions := SkirdaSessions{}
|
||||
// for _, domain := range domains {
|
||||
// plainSessions = append(plainSessions, SkirdaSessions...)
|
||||
// }
|
||||
// return plainSessions
|
||||
// }
|
||||
func (domains Domains) GetSessions() skirdasession.SkirdaSessions {
|
||||
plainSessions := skirdasession.SkirdaSessions{}
|
||||
for _, domain := range domains {
|
||||
plainSessions = append(plainSessions, domain.SkirdaSessions...)
|
||||
}
|
||||
return plainSessions
|
||||
}
|
||||
|
||||
func (domains Domains) FindDomain(domainId string) (SkirdaDomain, error) {
|
||||
for _, domain := range domains {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package domain
|
||||
package minecraftgame
|
||||
|
||||
type JavaVersion struct {
|
||||
VersionNums `json:"version"`
|
||||
@ -40,10 +40,10 @@ type AssetIndex struct {
|
||||
Artifact
|
||||
}
|
||||
|
||||
// type Argument struct {
|
||||
// Value string `json:"value"`
|
||||
// Rules []Rule `json:"rules"`
|
||||
// }
|
||||
type Argument struct {
|
||||
Value string `json:"value"`
|
||||
Rules []Rule `json:"rules"`
|
||||
}
|
||||
|
||||
type Rule struct {
|
||||
Action RuleAct `json:"action" mapstructure:"action"`
|
||||
@ -103,6 +103,3 @@ type ModArtifact struct {
|
||||
Name string
|
||||
Version string
|
||||
}
|
||||
|
||||
type VersionMeta struct {
|
||||
}
|
||||
|
3
go.mod
Normal file
3
go.mod
Normal file
@ -0,0 +1,3 @@
|
||||
module git.gregbrzezinski.com/Skirda/sharedutils
|
||||
|
||||
go 1.18
|
@ -1,4 +1,4 @@
|
||||
package domain
|
||||
package skirdasession
|
||||
|
||||
import (
|
||||
"errors"
|
Loading…
Reference in New Issue
Block a user