Compare commits

..

No commits in common. "0dce90931c63fb589dbf28680a752424d88ffea9" and "605da815cd37039112f0d5cf8d202702123702d2" have entirely different histories.

4 changed files with 21 additions and 19 deletions

View File

@ -2,17 +2,19 @@ package domain
import ( import (
"errors" "errors"
"git.gregbrzezinski.com/Skirda/skirdaGoLauncher/sharedutils/skirdasession"
) )
type SkirdaDomain struct { type SkirdaDomain struct {
DomainId string DomainId string
SkirdaGames 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.AddGames(newGames)
// domain.AddSessions(newSessions) domain.AddSessions(newSessions)
} }
type Domains []SkirdaDomain type Domains []SkirdaDomain
@ -40,13 +42,13 @@ func (domains Domains) GetGames() SkirdaGames {
return allGames return allGames
} }
// func (domains Domains) GetSessions() SkirdaSessions { func (domains Domains) GetSessions() skirdasession.SkirdaSessions {
// plainSessions := SkirdaSessions{} plainSessions := skirdasession.SkirdaSessions{}
// for _, domain := range domains { for _, domain := range domains {
// plainSessions = append(plainSessions, SkirdaSessions...) plainSessions = append(plainSessions, domain.SkirdaSessions...)
// } }
// return plainSessions return plainSessions
// } }
func (domains Domains) FindDomain(domainId string) (SkirdaDomain, error) { func (domains Domains) FindDomain(domainId string) (SkirdaDomain, error) {
for _, domain := range domains { for _, domain := range domains {

View File

@ -1,4 +1,4 @@
package domain package minecraftgame
type JavaVersion struct { type JavaVersion struct {
VersionNums `json:"version"` VersionNums `json:"version"`
@ -40,10 +40,10 @@ type AssetIndex struct {
Artifact Artifact
} }
// type Argument struct { type Argument struct {
// Value string `json:"value"` Value string `json:"value"`
// Rules []Rule `json:"rules"` Rules []Rule `json:"rules"`
// } }
type Rule struct { type Rule struct {
Action RuleAct `json:"action" mapstructure:"action"` Action RuleAct `json:"action" mapstructure:"action"`
@ -103,6 +103,3 @@ type ModArtifact struct {
Name string Name string
Version string Version string
} }
type VersionMeta struct {
}

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.gregbrzezinski.com/Skirda/sharedutils
go 1.18

View File

@ -1,4 +1,4 @@
package domain package skirdasession
import ( import (
"errors" "errors"