61 lines
1.1 KiB
Go
61 lines
1.1 KiB
Go
package shell
|
|
|
|
import (
|
|
"mongo.games.com/game/gamesrv/slotspkg/internal/dao/dataset"
|
|
"mongo.games.com/game/gamesrv/slotspkg/internal/generic/key"
|
|
)
|
|
|
|
type Shell struct {
|
|
Category string
|
|
*dataset.DataSet
|
|
}
|
|
|
|
func NewShell(category string) *Shell {
|
|
return &Shell{
|
|
Category: category,
|
|
DataSet: shellStorage.DataSet(category),
|
|
}
|
|
}
|
|
|
|
func Category(category string) *Shell {
|
|
return NewShell(category)
|
|
}
|
|
|
|
func Base() *Shell {
|
|
return NewShell(key.Base)
|
|
}
|
|
|
|
func (s *Shell) Update() {
|
|
s.DataSet = shellStorage.DataSet(s.Category)
|
|
}
|
|
func (s *Shell) Clone() *Shell {
|
|
return NewShell(s.Category)
|
|
}
|
|
func (s *Shell) UpdateCategory(category string) {
|
|
s.Category = category
|
|
}
|
|
|
|
type OriginShell struct {
|
|
Category string
|
|
*dataset.DataSet
|
|
}
|
|
|
|
func NewOriginShell(category string) *OriginShell {
|
|
return &OriginShell{
|
|
Category: category,
|
|
DataSet: shellStorage.OriginDataSet(category),
|
|
}
|
|
}
|
|
|
|
func OriginBase() *OriginShell {
|
|
return NewOriginShell(key.Base)
|
|
}
|
|
|
|
func (s *OriginShell) Update() {
|
|
s.DataSet = shellStorage.OriginDataSet(s.Category)
|
|
}
|
|
|
|
func (s *OriginShell) UpdateCategory(category string) {
|
|
s.Category = category
|
|
}
|