Yimaru-BackEnd/internal/services/event/port.go
Samuel Tariku e49ff366d5 feat: Implement wallet notification system and refactor related services
- Added new notification handling in the wallet service to notify admins when wallet balances are low or insufficient.
- Created a new file for wallet notifications and moved relevant functions from the wallet service to this new file.
- Updated the wallet service to publish wallet events including wallet type.
- Refactored the client code to improve readability and maintainability.
- Enhanced the bet handler to support pagination and status filtering for bets.
- Updated routes and handlers for user search functionality to improve clarity and organization.
- Modified cron job scheduling to comment out unused jobs for clarity.
- Updated the WebSocket broadcast to include wallet type in notifications.
- Adjusted the makefile to include Kafka in the docker-compose setup for local development.
2025-09-25 21:26:24 +03:00

24 lines
1.2 KiB
Go

package event
import (
"context"
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
)
type Service interface {
// FetchLiveEvents(ctx context.Context) error
FetchUpcomingEvents(ctx context.Context) error
GetAllEvents(ctx context.Context, filter domain.EventFilter) ([]domain.BaseEvent, int64, error)
GetEventByID(ctx context.Context, ID int64) (domain.BaseEvent, error)
// GetAndStoreMatchResult(ctx context.Context, eventID int64) error
UpdateFinalScore(ctx context.Context, eventID int64, fullScore string, status domain.EventStatus) error
UpdateEventStatus(ctx context.Context, eventID int64, status domain.EventStatus) error
IsEventMonitored(ctx context.Context, eventID int64) (bool, error)
UpdateEventMonitored(ctx context.Context, eventID int64, IsMonitored bool) error
GetEventsWithSettings(ctx context.Context, companyID int64, filter domain.EventFilter) ([]domain.EventWithSettings, int64, error)
GetEventWithSettingByID(ctx context.Context, ID int64, companyID int64) (domain.EventWithSettings, error)
UpdateEventSettings(ctx context.Context, event domain.CreateEventSettings) error
GetSportAndLeagueIDs(ctx context.Context, eventID int64) ([]int64, error)
}