Documentation
¶
Index ¶
- Constants
- type Graph
- func CreateFileGraph(relationship *object.SourceContext, opts *common.GraphOptions) (*Graph, error)
- func CreateFileGraphFromDirWithLSIF(opts *common.GraphOptions) (*Graph, error)
- func CreateFileGraphFromDirWithSCIP(opts *common.GraphOptions) (*Graph, error)
- func CreateFileGraphFromGolangDir(opts *common.GraphOptions) (*Graph, error)
- func NewEmptyFileGraph() *Graph
- func (fg *Graph) DirectReferenceIds(f *Vertex) []string
- func (fg *Graph) DirectReferencedCount(f *Vertex) int
- func (fg *Graph) DirectReferencedIds(f *Vertex) []string
- func (fg *Graph) DrawDot(filename string) error
- func (fg *Graph) DrawG6Html(filename string) error
- func (fg *Graph) EntryIds(f *Vertex) []string
- func (fg *Graph) FillWithRed(vertexHash string) error
- func (fg *Graph) FilterFunctions(f func(*Vertex) bool) []*Vertex
- func (fg *Graph) GetById(id string) *Vertex
- func (fg *Graph) GlobalStat(points []*Vertex) *object.StatGlobal
- func (fg *Graph) ListEntries() []*Vertex
- func (fg *Graph) ListFiles() []*Vertex
- func (fg *Graph) RelationBetween(a string, b string) (*common.EdgeStorage, error)
- func (fg *Graph) RemoveNodeById(path string) error
- func (fg *Graph) Stat(f *Vertex) *object.ImpactUnit
- func (fg *Graph) ToDirGraph() (*Graph, error)
- func (fg *Graph) ToG6Data() (*g6.Data, error)
- func (fg *Graph) TransitiveReferenceIds(f *Vertex) []string
- func (fg *Graph) TransitiveReferencedIds(f *Vertex) []string
- type Vertex
Constants ¶
View Source
const TagEntry = "entry"
View Source
const TagRed = "red"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
// reference graph (called graph)
G graph.Graph[string, *Vertex]
// reverse reference graph (call graph)
Rg graph.Graph[string, *Vertex]
// k: id, v: file
IdCache map[string]*Vertex
}
func CreateFileGraph ¶
func CreateFileGraph(relationship *object.SourceContext, opts *common.GraphOptions) (*Graph, error)
func CreateFileGraphFromDirWithLSIF ¶
func CreateFileGraphFromDirWithLSIF(opts *common.GraphOptions) (*Graph, error)
func CreateFileGraphFromDirWithSCIP ¶
func CreateFileGraphFromDirWithSCIP(opts *common.GraphOptions) (*Graph, error)
func CreateFileGraphFromGolangDir ¶
func CreateFileGraphFromGolangDir(opts *common.GraphOptions) (*Graph, error)
func NewEmptyFileGraph ¶
func NewEmptyFileGraph() *Graph
func (*Graph) DirectReferenceIds ¶
func (*Graph) DirectReferencedCount ¶
func (*Graph) DirectReferencedIds ¶
func (*Graph) DrawG6Html ¶
func (*Graph) FillWithRed ¶
func (*Graph) GlobalStat ¶
func (fg *Graph) GlobalStat(points []*Vertex) *object.StatGlobal
func (*Graph) ListEntries ¶
func (*Graph) RelationBetween ¶
func (*Graph) RemoveNodeById ¶
func (*Graph) ToDirGraph ¶
func (*Graph) TransitiveReferenceIds ¶
func (*Graph) TransitiveReferencedIds ¶
type Vertex ¶
type Vertex struct {
Path string
Referenced int
// https://github.com/smartpossess/srctx/issues/41
Tags map[string]struct{} `json:"tags,omitempty"`
}
func Path2vertex ¶
func (*Vertex) ContainTag ¶
Click to show internal directories.
Click to hide internal directories.