Documentation
¶
Overview ¶
Package hosted is the knowledge-only mode: game-data tools answered from a dataset published at a URL, read over HTTP range requests, with no character tools and no capture access.
Index ¶
Constants ¶
const NotAvailable = "not available in knowledge-only mode: this server holds game data only, and reads no character files"
NotAvailable is what a character tool answers in knowledge-only mode.
Variables ¶
var CharacterTools = []string{"list_characters", "character_brief", "whats_next", "upgrade_finder", "upgrade_paths", "stat_check", "profession_plan", "where_to_learn", "where_to_gather", "find_vendor", "travel_route",
"talent_plan", "talent_tree", "get_character_profile", "set_character_profile", "dungeon_plan", "farm_spots", "quest_chain", "quest_plan", "inventory_review", "seasonal_events", "bags_across_characters", "update_digest", "doctor"}
CharacterTools are the full server's tools that read the character capture or local files.
var ErrTooLarge = errors.New("response larger than the size cap")
ErrTooLarge means a response is bigger than Limits.MaxResponseBytes.
var RequiredTables = []string{"items", "quests", "npcs", "loot_sources", "instances", "instance_bosses", "recipes", "recipe_reagents", "quest_lines"}
RequiredTables are the tables the knowledge tools read.
Functions ¶
Types ¶
type Dataset ¶
type Dataset struct {
Base string
Manifest dataset.Manifest
Store *store.ParquetStore
Limits Limits
// contains filtered or unexported fields
}
Dataset is a remote dataset opened over range requests.
func Open ¶
Open loads manifest.json from base, checks it, confirms every listed table is served with range support and a readable Parquet footer. Hashes are not checked: that would download every table; the manifest and tables must come over a trusted channel (HTTPS).
type DungeonInput ¶
type DungeonInput struct {
MapID int64 `json:"map_id,omitempty" jsonschema:"map id"`
Name string `json:"name,omitempty" jsonschema:"dungeon or raid name, or part of it"`
}
DungeonInput is the dungeon_info argument.
type IDNameInput ¶
type IDNameInput struct {
ID int64 `json:"id,omitempty" jsonschema:"id"`
Name string `json:"name,omitempty" jsonschema:"name, or part of it (npcs only)"`
}
IDNameInput is the quest_lookup and npc_lookup argument.
type Info ¶
type Info struct {
Version string `json:"version"`
Mode string `json:"mode"`
Dataset string `json:"dataset" jsonschema:"dataset URL, without credentials"`
ManifestVersion string `json:"manifest_version"`
GameBuild string `json:"game_build"`
Tables int `json:"tables"`
TimeoutMS int64 `json:"request_timeout_ms"`
MaxResponse int64 `json:"max_response_bytes"`
MaxConcurrent int `json:"max_concurrent_requests"`
}
Info is the server_info result.
type ItemInput ¶
type ItemInput struct {
ID int64 `json:"id,omitempty" jsonschema:"item id"`
Name string `json:"name,omitempty" jsonschema:"item name, exact or part of it"`
}
ItemInput is the item_lookup and where_drops argument; give an id or a name.
type Limits ¶
type Limits struct {
Timeout time.Duration // per HTTP request, headers and body
MaxResponseBytes int64 // per HTTP response body
MaxConcurrent int // HTTP requests in flight at once
}
Limits bound what one request to the dataset host may cost.
func DefaultLimits ¶
func DefaultLimits() Limits
DefaultLimits suit a static file host: tables are a few hundred kilobytes.
type RecipeInput ¶
type RecipeInput struct {
SpellID int64 `json:"spell_id,omitempty" jsonschema:"recipe spell id"`
Name string `json:"name,omitempty" jsonschema:"recipe name, or part of it"`
}
RecipeInput is the recipe_lookup argument.