Documentation
¶
Index ¶
- func ExportPheromones(signals []colony.PheromoneSignal) ([]byte, error)
- func ExportRegistry(entries []ColonyEntry) ([]byte, error)
- func ExportWisdom(entries []WisdomEntry, minConfidence float64, colonyID string) ([]byte, error)
- func ImportPheromones(xmlData []byte) ([]colony.PheromoneSignal, error)
- type Ancestor
- type AncestorXML
- type ColonyArchiveXML
- type ColonyEntry
- type ColonyXML
- type LineageXML
- type PatternXML
- type PheromoneXML
- type PhilosophyXML
- type RegistryXML
- type SignalXML
- type WisdomEntry
- type WisdomXML
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportPheromones ¶
func ExportPheromones(signals []colony.PheromoneSignal) ([]byte, error)
ExportPheromones exports pheromone signals to XML matching shell format.
func ExportRegistry ¶
func ExportRegistry(entries []ColonyEntry) ([]byte, error)
ExportRegistry exports colony entries to XML.
func ExportWisdom ¶
func ExportWisdom(entries []WisdomEntry, minConfidence float64, colonyID string) ([]byte, error)
ExportWisdom exports wisdom entries to XML, filtering by confidence threshold.
func ImportPheromones ¶
func ImportPheromones(xmlData []byte) ([]colony.PheromoneSignal, error)
ImportPheromones imports pheromone signals from XML.
Types ¶
type AncestorXML ¶
type AncestorXML struct {
XMLName xml.Name `xml:"ancestor"`
ID string `xml:"id,attr"`
Depth int `xml:"depth,attr"`
}
AncestorXML represents a single ancestor in the lineage.
type ColonyArchiveXML ¶
type ColonyArchiveXML struct {
XMLName xml.Name `xml:"colony-archive"`
ColonyID string `xml:"colony_id,attr"`
SealedAt string `xml:"sealed_at,attr"`
Version string `xml:"version,attr"`
Pheromones *PheromoneXML `xml:"pheromones"`
Wisdom *WisdomXML `xml:"queen-wisdom"`
Registry *RegistryXML `xml:"colony-registry"`
}
ColonyArchiveXML is the composite archive format.
type ColonyEntry ¶
type ColonyEntry struct {
ID string
Name string
Status string
CreatedAt string
ParentID string
Ancestors []Ancestor
}
ColonyEntry represents a colony for registry export/import.
func ImportRegistry ¶
func ImportRegistry(xmlData []byte) ([]ColonyEntry, error)
ImportRegistry imports colony entries from XML.
type ColonyXML ¶
type ColonyXML struct {
XMLName xml.Name `xml:"colony"`
ID string `xml:"id,attr"`
Status string `xml:"status,attr"`
Name string `xml:"name"`
ParentID string `xml:"parent_id,omitempty"`
Lineage *LineageXML `xml:"lineage,omitempty"`
CreatedAt string `xml:"created_at,attr"`
}
ColonyXML represents a colony in registry XML.
type LineageXML ¶
type LineageXML struct {
Ancestors []AncestorXML `xml:"ancestor"`
}
LineageXML represents colony ancestry.
type PatternXML ¶
type PatternXML struct {
XMLName xml.Name `xml:"pattern"`
ID string `xml:"id,attr"`
Confidence string `xml:"confidence,attr"`
Domain string `xml:"domain,attr"`
Source string `xml:"source,attr"`
CreatedAt string `xml:"created_at,attr"`
Content string `xml:"content"`
}
PatternXML represents a wisdom pattern entry.
type PheromoneXML ¶
type PheromoneXML struct {
XMLName xml.Name `xml:"pheromones"`
Version string `xml:"version,attr"`
GeneratedAt string `xml:"generated_at,attr"`
Count int `xml:"count,attr"`
Signals []SignalXML `xml:"signal"`
}
PheromoneXML is the root XML element for pheromone exchange. Matches the shell output format from pheromone-xml.sh.
type PhilosophyXML ¶
type PhilosophyXML struct {
XMLName xml.Name `xml:"philosophy"`
ID string `xml:"id,attr"`
Confidence string `xml:"confidence,attr"`
Domain string `xml:"domain,attr"`
Source string `xml:"source,attr"`
CreatedAt string `xml:"created_at,attr"`
Content string `xml:"content"`
}
PhilosophyXML represents a queen philosophy entry.
type RegistryXML ¶
type RegistryXML struct {
XMLName xml.Name `xml:"colony-registry"`
Version string `xml:"version,attr"`
GeneratedAt string `xml:"generated_at,attr"`
Colonies []ColonyXML `xml:"colony"`
}
RegistryXML is the root XML element for colony registry exchange.
type SignalXML ¶
type SignalXML struct {
XMLName xml.Name `xml:"signal"`
ID string `xml:"id,attr"`
Type string `xml:"type,attr"`
Priority string `xml:"priority,attr"`
Source string `xml:"source,attr"`
CreatedAt string `xml:"created_at,attr"`
ExpiresAt string `xml:"expires_at,attr,omitempty"`
Active string `xml:"active,attr"`
Content string `xml:"content>text"`
}
SignalXML represents a single pheromone signal in XML.
type WisdomEntry ¶
type WisdomEntry struct {
ID string
Category string // "philosophy" or "pattern"
Confidence float64
Domain string
Source string
CreatedAt string
Content string
}
WisdomEntry represents a wisdom entry for export/import.
func ImportWisdom ¶
func ImportWisdom(xmlData []byte) ([]WisdomEntry, error)
ImportWisdom imports wisdom entries from XML.
type WisdomXML ¶
type WisdomXML struct {
XMLName xml.Name `xml:"queen-wisdom"`
Version string `xml:"version,attr"`
ColonyID string `xml:"colony_id,attr"`
GeneratedAt string `xml:"generated_at,attr"`
Philosophies []PhilosophyXML `xml:"philosophies>philosophy"`
Patterns []PatternXML `xml:"patterns>pattern"`
}
WisdomXML is the root XML element for queen wisdom exchange.