Static Data

Embedded ClashKing static data, translations, and lookup helpers.

Static Data

struct clashy.StaticData

StaticData is the parsed and indexed ClashKing static data embedded in the package.

Raw

map[string][]map[string]any

Raw preserves static-data sections exactly as parsed from static_data.json.

ByID

map[int]map[string]any

ByID indexes static-data entries by their numeric _id value.

ByName

map[string]map[string]any

ByName indexes static-data entries by normalized name, section, and village.

Translations

map[string]map[string]string

Translations maps translation IDs to language-code/value maps.

Translation

struct clashy.Translation

Translation contains one static-data translation entry.

ID

string json: id

ID is the translation identifier.

English

string json: EN

English is the EN translation value.

Languages

map[string]string

Languages maps language codes to translated strings.

Functions

clashy.LoadStaticData() -> (*StaticData, error)

LoadStaticData parses the embedded static-data files once and returns the shared indexed result.

Return type:
*StaticData error