Documentation ¶
Index ¶
- type Battle
- type BattleEntity
- type DreamWorld
- type FindWith
- type IBattleRepository
- type ICountRowRepository
- type ICreateBulkRepository
- type ICreateRepository
- type IDeleteRepository
- type IMonsterRepository
- type IPokeapiRESTRepository
- type IPokewarService
- type IRankRepository
- type IReadAllRepository
- type IReadOneRepository
- type IUpdateRepository
- type Log
- type Monster
- type MonsterEntity
- type Move
- type Moves
- type Other
- type Player
- type Pokemon
- type PokemonResult
- type PokemonSummary
- type Rank
- type Skill
- type Sprites
- type Stat
- type Stats
- type Type
- type Types
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BattleEntity ¶
type DreamWorld ¶
type DreamWorld struct {
FrontDefault string `json:"front_default"`
}
type IBattleRepository ¶
type IBattleRepository interface { ICreateRepository[Battle] IReadAllRepository[Battle] ICountRowRepository }
type ICountRowRepository ¶
type ICreateBulkRepository ¶
ICreateBulkRepository - Bulk Create
type ICreateRepository ¶
ICreateRepository - Create
type IDeleteRepository ¶
IDeleteRepository - Delete
type IMonsterRepository ¶
type IPokeapiRESTRepository ¶
type IPokewarService ¶
type IPokewarService interface { MonstersCount() int FetchMonsters(args ...string) (data []*Monster, err *utils.ServiceError) SyncMonsters(updateEnv bool, args ...string) (data []*Monster, err *utils.ServiceError) FetchRanks(args ...string) (data []*Rank, err *utils.ServiceError) BattlesCount() int FetchBattles(args ...string) (data []*Battle, err *utils.ServiceError) PrepareMonstersForBattle() (data []*Monster, err *utils.ServiceError) AddBattle(param *Battle) *utils.ServiceError }
type IRankRepository ¶
type IRankRepository interface { IReadAllRepository[Rank] }
type IReadAllRepository ¶
type IReadAllRepository[T any] interface { All(ctx context.Context, args ...string) (data []*T, err error) }
IReadAllRepository - ReadAllNoCondition (args: LIMIT, OFFSET, OR WHERE CLAUSE)
type IReadOneRepository ¶
type IReadOneRepository[T any] interface { Find(ctx context.Context, key FindWith, val any) (data *T, err error) }
IReadOneRepository - ReadOne/Show
type IUpdateRepository ¶
IUpdateRepository - Update
type Monster ¶
type Monster struct { ID int `json:"id"` OriginID int `json:"origin_id"` Name string `json:"name"` BaseExp int `json:"base_exp"` Height int `json:"height"` Weight int `json:"weight"` Avatar string `json:"avatar"` Types []string `json:"types"` Stats []Stat `json:"stats"` Skills []*Skill `json:"skills"` }
type MonsterEntity ¶
type Other ¶
type Other struct {
DreamWorld DreamWorld `json:"dream_world"`
}
type PokemonResult ¶
type PokemonResult struct { Count int `json:"count"` Next string `json:"next"` Previous interface{} `json:"previous"` Results []PokemonSummary `json:"results"` }
type PokemonSummary ¶
type Rank ¶
type Rank struct { ID int `json:"id"` OriginID int `json:"origin_id"` Name string `json:"name"` Avatar string `json:"avatar"` T string `json:"-"` Types []string `json:"types"` TotalBattles int `json:"total_battles"` WinBattles int `json:"win_battles"` LoseBattle int `json:"lose_battles"` Points int `json:"points"` }
Click to show internal directories.
Click to hide internal directories.