Help us shape the future of Go! Take the 2026 Go Developer Survey

model

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EdgeCalls      = "CALLS"
	EdgeExports    = "EXPORTS"
	EdgeImports    = "IMPORTS"
	EdgeContains   = "CONTAINS"
	EdgeImplements = "IMPLEMENTS"
	EdgeExtends    = "EXTENDS"
	EdgeDefinedIn  = "DEFINED_IN"
)
View Source
const (
	KindFunction  = "function"
	KindMethod    = "method"
	KindClass     = "class"
	KindStruct    = "struct"
	KindInterface = "interface"
	KindTrait     = "trait"
	KindEnum      = "enum"
	KindImpl      = "impl"
	KindModule    = "module"
)
View Source
const (
	LangPython = "python"
	LangGo     = "go"
	LangRust   = "rust"
)
View Source
const (
	VisPublic  = "public"
	VisPrivate = "private"
)

Variables

This section is empty.

Functions

func MakeID

func MakeID(lang, path, fqName string) string

MakeID generates a deterministic ID from language, path, and fully qualified name.

Types

type Edge

type Edge struct {
	From string `json:"from"`
	To   string `json:"to"`
	Type string `json:"type"`
}

Edge represents a directed relationship between two elements.

type Element

type Element struct {
	ID         string `json:"id"`
	Language   string `json:"language"`
	Kind       string `json:"kind"`
	Name       string `json:"name"`
	FQName     string `json:"fq_name"`
	Path       string `json:"path"`
	StartLine  int    `json:"start_line"`
	EndLine    int    `json:"end_line"`
	LOC        int    `json:"loc"`
	Signature  string `json:"signature"`
	Visibility string `json:"visibility"`
	Docstring  string `json:"docstring"`
	Body       string `json:"body"`
}

Element represents a code construct such as a function, class, or struct.

Jump to

Keyboard shortcuts

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