shredbx logo
shredbx shredbx shredbx shredbx Personal
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
AClaude
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
Andrei Solovev
Packages
Search packages... ⌘K
  • Data & Persistence
    • Databases 3
    • Object Storage 1
    • File Formats 2
    • Enumerations 2
    • Content 1
    • Codegen 2
  • System Integration
    • Secrets 1
    • CLI Tools 5
    • Media Processing 2
    • Adapters 2
  • UI & Components
    • Primitives 1
    • Blocks 1
    • Sections & Layouts 1
    • Entities 1
    • Media 1
    • Utilities 1
    • State & Presenter 1
    • Branding & Style 1
  • Game Engine
    • Framework 1
    • Engine 2
    • Presets 1
    • Vendor 1
Packages/ Data & Persistence/ Enumerations/ Catalogue
Go Package

catalogue

Hierarchical catalogue — nested category trees with path-based lookup

Go Ready MD
Tree Traversal go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cat := catalogue.Build(propertyTypes.Entries)

// Path-based lookup: "residential/apartment"
node, ok := cat.Lookup("residential/apartment")
// node.Label == "Apartment", node.Depth == 2

// Walk the tree for navigation rendering
cat.Walk(func(node *catalogue.Node, depth int) bool {
    indent := strings.Repeat("  ", depth)
    fmt.Printf("%s%s (%d children)\n", indent, node.Label, len(node.Children))
    return true // continue traversal
})
// residential (3 children)
//   apartment (0 children)
//   house (2 children)
//     townhouse (0 children)
//     detached (0 children)

About

Builds and queries hierarchical category trees from dictionary entries. Supports materialized path lookups, depth-limited traversal, and efficient subtree extraction for navigation and filtering use cases.

Public API

NameKindSignature
Cataloguetypetype Catalogue struct
Nodetypetype Node struct
Buildfuncfunc Build(entries []dictionary.Entry) *Catalogue
Lookupfuncfunc (c *Catalogue) Lookup(path string) (*Node, bool)
Walkfuncfunc (c *Catalogue) Walk(fn func(node *Node, depth int) bool)

Dependencies

Imports (1)

dictionary Go Ready

Two-tier dictionary sync — YAML-defined enumerations with database sync

enumerationslookup-tablesyaml-synctwo-tier
4 exports 2 deps

Related Packages

dictionary Go Ready

Two-tier dictionary sync — YAML-defined enumerations with database sync

enumerationslookup-tablesyaml-synctwo-tier
4 exports 2 deps

Source

github.com/shredbx/sbx-core/pkg/catalogue
hierarchytree-structurecategoriespath-lookup
shredbx logo shredbx shredbx shredbx shredbx Andrei Solovev

Solution Architect & Lead Software Engineer

ExperiencePortfolioResearch & ExperimentsEducationCertificationSkills
GitHub ↗LinkedIn ↗Email ↗
AVAILABLE FOR NEW PROJECTS
// MY LATEST BEATS
Hobby & Interests

Lab

  • The Lab
  • Framework
  • Components
  • Packages
  • Games
  • Process (SDLC)
  • Knowledge
  • Blog

Andrei

  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
  • Lifestyle

Team

  • Team
  • Andrei
  • Claude

Legal

  • Privacy
  • Terms
  • Cookies
© 2026 shredbx.com. All rights reserved. — Andrei Solovev |