golang

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 25 Imported by: 0

README

TODO: add docs to this readme on how we generate go CGs

Documentation

Index

Constants

View Source
const (
	AlgorithmStatic = "static"
	AlgorithmCHA    = "cha"
	AlgorithmRTA    = "rta"
	AlgorithmVTA    = "vta"
)
View Source
const Name = "golang"
View Source
const StandardVersion = "1"

Variables

This section is empty.

Functions

func IsApplicationNode

func IsApplicationNode(filename string, pwd string) bool

Types

type CallgraphBuilder

type CallgraphBuilder struct {
	// contains filtered or unexported fields
}

func NewCallgraphBuilder

func NewCallgraphBuilder(
	workingDirectory string,
	mainFile string,
	outputName string,
	filesystem ioFs.IFileSystem,
	ctx cgexec.IContext,
) CallgraphBuilder

func (*CallgraphBuilder) RunCallGraph

func (cg *CallgraphBuilder) RunCallGraph() (string, error)

type Edge

type Edge struct {
	Caller *ssa.Function
	Callee *ssa.Function
	// contains filtered or unexported fields
}

func (*Edge) CallLine

func (e *Edge) CallLine() int

func (*Edge) CalleeFilename

func (e *Edge) CalleeFilename() string

func (*Edge) CallerFilename

func (e *Edge) CallerFilename() string

type ICallgraphBuilder

type ICallgraphBuilder interface {
	RunCallGraph() (string, error)
}

type Job

type Job struct {
	job.BaseJob
	// contains filtered or unexported fields
}

func NewJob

func NewJob(dir string, mainFile string, writer ioFs.IFileWriter, archive io.IArchive, config conf.IConfig, ctx cgexec.IContext, fs ioFs.IFileSystem) *Job

func (*Job) Run

func (j *Job) Run()

type Language

type Language struct {
	// contains filtered or unexported fields
}

func NewLanguage

func NewLanguage() Language

func (Language) Name

func (language Language) Name() string

func (Language) Version

func (language Language) Version() string

type Strategy

type Strategy struct {
	// contains filtered or unexported fields
}

func NewStrategy

func NewStrategy(config conf.IConfig, paths []string, exclusions []string, finder finder.IFinder, ctx cgexec.IContext) Strategy

func (Strategy) Invoke

func (s Strategy) Invoke() ([]job.IJob, error)

Jump to

Keyboard shortcuts

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