Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { *model.Collection Has bool }
type GachaResult ¶
type GachaResult struct { *model.Collection Has bool `json:"has"` }
type GameUseCase ¶
type GameUseCase interface { FinishGame(ctx context.Context, scoreValue int) (int, error) DrawGacha(ctx context.Context, times int) ([]*GachaResult, error) }
func NewGameUseCase ¶
func NewGameUseCase( tr repository.TransactionRepository, ur repository.UserRepository, ucr repository.UserCollectionRepository, sr repository.ScoreRepository, rr repository.RankingRepository, cr repository.CollectionRepository, ccr repository.CollectionCacheRepository, ) GameUseCase
type RankingUseCase ¶
type RankingUseCase interface {
ListRankings(ctx context.Context, start int) ([]*model.Ranking, error)
}
func NewRankingUseCase ¶
func NewRankingUseCase(rr repository.RankingRepository) RankingUseCase
type UserUseCase ¶
type UserUseCase interface { GetUser(ctx context.Context) (*model.User, error) ListUserCollections(ctx context.Context) ([]*Collection, error) CreateUserAndToken(ctx context.Context, email string, passward string) (string, error) UpdateUser(ctx context.Context, coins, highscore int) (*model.User, error) }
func NewUserUseCase ¶
func NewUserUseCase( ur repository.UserRepository, tr repository.TransactionRepository, ucr repository.UserCollectionRepository, cr repository.CollectionRepository, ccr repository.CollectionCacheRepository, ) UserUseCase
Click to show internal directories.
Click to hide internal directories.