Help us shape the future of Go! Take the 2026 Go Developer Survey

pogo-masterfile

module
v0.0.0-...-9ddd41a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT

README

pogo-masterfile

Generated, language-native type definitions and runtime APIs for the Pokémon GO masterfile — published as pogo-masterfile-types / pogo-masterfile for TypeScript (npm), Rust (crates.io), and Go (proxy.golang.org).

The masterfile is a single JSON document of ~hundreds of strongly-typed entry kinds (PokemonSettings, MoveSettings, ItemSettings, …). This repo treats it as a schema source and emits idiomatic types — plus a typed loader/lookup runtime — for all three target languages, so you don't have to roll your own.

Published artifacts

Language Types Runtime API Registry
TypeScript pogo-masterfile-types pogo-masterfile npm
Rust pogo-masterfile-types pogo-masterfile crates.io
Go …/packages/go …/packages/go-api proxy.golang.org

Each types package ships:

  • An Entry / EntryData / payload triple per discriminator — the outer { templateId, data: { … } } wrapper, the inner data object, and the discriminator-keyed payload itself.
  • A parseMasterfile (or ParseMasterfile) helper that dispatches each JSON entry to its concrete type by inspecting the inner data object's non-templateId key.
  • Shared Singletons / singletons module for entries that are unique by templateId and don't deserve their own file.

See each package's README for install lines and a usage example:

Development

bun install            # install dependencies
bun run generate       # regenerate all three language packages
bun run typecheck      # tsc --noEmit
bun run lint           # biome check
bun test               # run generator unit tests

Generator source lives under src/:

  • src/generate.ts — top-level orchestrator
  • src/typescript/, src/rust/, src/go/ — per-language emitters
  • src/infer.ts, src/group.ts, src/split.ts — schema inference & shape grouping

See CONTRIBUTING.md for release/tagging conventions.

License

MIT — see LICENSE.

Directories

Path Synopsis
src
go-api/templates
Package masterfileapi provides a runtime API for the Pokémon GO masterfile — loads, indexes, and queries entries by templateID with per-group typed accessors.
Package masterfileapi provides a runtime API for the Pokémon GO masterfile — loads, indexes, and queries entries by templateID with per-group typed accessors.

Jump to

Keyboard shortcuts

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