Documentation
¶
Overview ¶
Package dbd parses WoWDBDefs .dbd definition files and selects the version block matching an exact build number.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchCached ¶
FetchCached returns the path to a cached .dbd for tableName under cacheDir, fetching from WoWDBDefs when the cached copy is absent or older than 24h. On a failed refresh of an existing copy, the stale copy is used; a missing copy that cannot be fetched is fatal.
Types ¶
type Build ¶
func ParseBuild ¶
type BuildRange ¶
func (BuildRange) Contains ¶
func (r BuildRange) Contains(b Build) bool
func (BuildRange) String ¶
func (r BuildRange) String() string
type ColumnDefinition ¶
type DBDefinition ¶
type DBDefinition struct {
ColumnDefinitions map[string]ColumnDefinition
VersionDefinitions []VersionDefinitions
}
type Definition ¶
type VersionDefinitions ¶
type VersionDefinitions struct {
Builds []Build
BuildRanges []BuildRange
LayoutHashes []string
Comment string
Definitions []Definition
}
func SelectVersion ¶
func SelectVersion(def DBDefinition, buildNumber uint32) (VersionDefinitions, error)
SelectVersion returns the LAST versionDefinition (in file order) whose Builds list contains an entry with trailing build number == buildNumber.
Exact equality on the trailing build number only — buildRanges and layoutHashes are deliberately NOT consulted: WoWDBDefs lists the live builds explicitly for every configured table, and failing loud here beats silently decoding with a near-miss layout.