Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteFighterData ¶
DeleteFighterData deletes all records from the fighters and fighter_stats tables.
func Execute ¶
func Execute()
Execute runs the root command for the Fighters service. It executes the necessary logic for the command-line interface, handling errors and logging them if they occur.
func ReadFighterData ¶
ReadFighterData reads fighter data from a JSON file and returns a slice of model.Fighter. The file path is set to "../../scraper/collection/fighters.json".
func WriteFighterData ¶
WriteFighterData writes fighter data to a PostgreSQL database using the provided context, and a slice of model.Fighter. It connects to the database using the configuration from ViperPostgres and performs create or update operations for each fighter.
Types ¶
This section is empty.