seeder

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Seed

func Seed(
	importedData *ImportedData,
	factionsWriter factions.Writer,
	commandersWriter commanders.Writer,
	battlesWriter battles.Writer,
	logger logger.Interface,
)

Seed fills factions, commanders and battles data stores with the available ImportedData

Types

type ImportedData

type ImportedData struct {
	WikiBattlesByID    map[string]wikibattles.Battle `json:"BattlesByID"`
	WikiFactionsByID   map[string]wikiactors.Actor   `json:"FactionsByID"`
	WikiCommandersByID map[string]wikiactors.Actor   `json:"CommandersByID"`
}

ImportedData contains scraped battles and actors that have been read from a previously exported file. These have been indexed by their Wikipedia IDs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL