model

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package model defines core data structures for repoguide.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallEdge added in v1.2.0

type CallEdge struct {
	Caller string
	Callee string
}

CallEdge represents a function-level call: Caller calls Callee. Both names are the qualified symbol names as they appear in definitions (e.g., "Server.Handle", "greet").

type CallSite added in v1.2.0

type CallSite struct {
	Caller string
	Callee string
	File   string
	Line   int
}

CallSite records a specific call occurrence with its source location.

type Dependency

type Dependency struct {
	Source  string
	Target  string
	Symbols []string
}

Dependency represents an edge in the dependency graph: Source references symbols defined in Target.

type FileInfo

type FileInfo struct {
	Path     string
	Language string
	Tags     []Tag
	Rank     float64
}

FileInfo holds metadata and extracted tags for a single source file.

type RepoMap

type RepoMap struct {
	RepoName     string
	Root         string
	Files        []FileInfo
	Dependencies []Dependency
	CallEdges    []CallEdge
	CallSites    []CallSite
	// Members holds field/method tags for focused --symbol --members queries.
	// Empty in full-map mode.
	Members []Tag
}

RepoMap is the complete analyzed repository map, ready for serialization.

type SymbolKind

type SymbolKind string

SymbolKind indicates the syntactic kind of a symbol.

const (
	Class    SymbolKind = "class"
	Field    SymbolKind = "field"
	Function SymbolKind = "function"
	Method   SymbolKind = "method"
	Module   SymbolKind = "module"
)

type Tag

type Tag struct {
	Name       string
	Kind       TagKind
	SymbolKind SymbolKind
	Line       int
	File       string
	Signature  string
	Enclosing  string // qualified name of enclosing func/method for reference tags; "" if top-level
}

Tag represents a single symbol occurrence extracted from source code.

type TagKind

type TagKind string

TagKind indicates whether a tag is a definition or a reference.

const (
	Definition TagKind = "def"
	Reference  TagKind = "ref"
)

Jump to

Keyboard shortcuts

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