Documentation ¶
Index ¶
- type Dependency
- type ManagesHeroes
- type Service
- func (s *Service) ConfigFileName() string
- func (s *Service) CreateHero(name string, hero models.Hero) State
- func (s *Service) DefaultConfig() (cfg configFile.Config)
- func (s *Service) DependenciesResolved() bool
- func (s *Service) ExportToLua(state *lua.LState)
- func (s *Service) GetHeroByName(name string) *State
- func (s *Service) GetHeroes() []State
- func (s *Service) Init(mesh servicemesh.Mesh)
- func (s *Service) InitRoutes(group *gin.RouterGroup)
- func (s *Service) LoadConfig(config *configFile.Config)
- func (s *Service) LoadHeroes() error
- func (s *Service) Logger() *slog.Logger
- func (s *Service) Name() string
- func (s *Service) Ready() bool
- func (s *Service) ResolveDependencies(services []servicemesh.Service)
- func (s *Service) SaveHeroes() error
- func (s *Service) SetLogger(logger *slog.Logger)
- func (s *Service) Slug() string
- func (s *Service) UnexportFromLua(state *lua.LState)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency = ManagesHeroes
type ManagesHeroes ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ConfigFileName ¶
func (*Service) DefaultConfig ¶
func (s *Service) DefaultConfig() (cfg configFile.Config)
func (*Service) DependenciesResolved ¶
func (*Service) ExportToLua ¶
func (*Service) GetHeroByName ¶
func (*Service) Init ¶
func (s *Service) Init(mesh servicemesh.Mesh)
func (*Service) InitRoutes ¶
func (s *Service) InitRoutes(group *gin.RouterGroup)
func (*Service) LoadConfig ¶
func (s *Service) LoadConfig(config *configFile.Config)
func (*Service) LoadHeroes ¶
func (*Service) ResolveDependencies ¶
func (s *Service) ResolveDependencies(services []servicemesh.Service)
func (*Service) SaveHeroes ¶
func (*Service) UnexportFromLua ¶
type State ¶
type State struct { Name string Experience int Class models.Hero `json:"Class,string"` Level int Attributes map[string]int Skills []string // contains filtered or unexported fields }
func (*State) AddExperience ¶
func (*State) ExperienceRatio ¶
func (*State) SetAttribute ¶
func (*State) SetExperience ¶
func (*State) SubtractExperience ¶
Click to show internal directories.
Click to hide internal directories.