topics

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatText

func FormatText(graph TopicMap) string

func SummaryText

func SummaryText(graph TopicMap) string

Types

type Definition

type Definition struct {
	Topic        string   `json:"topic"`
	SourceTypes  []string `json:"source_types,omitempty"`
	SeedLimit    int      `json:"seed_limit"`
	RelatedLimit int      `json:"related_limit"`
	NotePath     string   `json:"note_path,omitempty"`
}

type Options

type Options struct {
	SourceTypes  []string
	SeedLimit    int
	RelatedLimit int
}

type TopicEntity

type TopicEntity struct {
	Key               string   `json:"key"`
	Name              string   `json:"name"`
	Kind              string   `json:"kind"`
	NotePath          string   `json:"note_path"`
	CanonicalURL      string   `json:"canonical_url,omitempty"`
	ReferenceCount    int      `json:"reference_count"`
	MatchedReferences int      `json:"matched_references"`
	MatchedSourceKeys []string `json:"matched_source_keys,omitempty"`
}

type TopicMap

type TopicMap struct {
	Topic        string         `json:"topic"`
	SourceTypes  []string       `json:"source_types,omitempty"`
	SeedLimit    int            `json:"seed_limit"`
	RelatedLimit int            `json:"related_limit"`
	Entities     []TopicEntity  `json:"entities,omitempty"`
	Pivots       TopicPivots    `json:"pivots,omitempty"`
	Synthesis    TopicSynthesis `json:"synthesis,omitempty"`
	Nodes        []TopicMapNode `json:"nodes"`
	Edges        []TopicMapEdge `json:"edges"`
}

func Build

func Build(ctx context.Context, st *store.Store, topic string, opts Options) (TopicMap, error)

func FromDefinition

func FromDefinition(ctx context.Context, st *store.Store, def Definition) (TopicMap, error)

type TopicMapEdge

type TopicMapEdge struct {
	From         string `json:"from"`
	To           string `json:"to"`
	Relationship string `json:"relationship"`
}

type TopicMapNode

type TopicMapNode struct {
	SourceKey  string `json:"source_key"`
	Kind       string `json:"kind"`
	Title      string `json:"title"`
	URL        string `json:"url"`
	NotePath   string `json:"note_path"`
	SourceType string `json:"source_type"`
	Role       string `json:"role"`
}

type TopicPivots

type TopicPivots struct {
	Projects     []TopicEntity  `json:"projects,omitempty"`
	Orgs         []TopicEntity  `json:"orgs,omitempty"`
	Sites        []TopicEntity  `json:"sites,omitempty"`
	People       []TopicEntity  `json:"people,omitempty"`
	SeedNodes    []TopicMapNode `json:"seed_nodes,omitempty"`
	RelatedNodes []TopicMapNode `json:"related_nodes,omitempty"`
}

type TopicSignal

type TopicSignal struct {
	Title      string   `json:"title"`
	Detail     string   `json:"detail"`
	SourceKeys []string `json:"source_keys,omitempty"`
}

type TopicSynthesis

type TopicSynthesis struct {
	Overview      string        `json:"overview,omitempty"`
	Angles        []string      `json:"angles,omitempty"`
	Signals       []TopicSignal `json:"signals,omitempty"`
	OpenQuestions []string      `json:"open_questions,omitempty"`
	WhyItMatters  string        `json:"why_it_matters,omitempty"`
}

Jump to

Keyboard shortcuts

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