Skip to main content

ssa

实例名实例描述
Java(ssaconfig.Language) "java"
Javascript(ssaconfig.Language) "js"
ModeAll(ssaconfig.Mode) 127
ModeProjectCompile(ssaconfig.Mode) 35
PHP(ssaconfig.Language) "php"
Yak(ssaconfig.Language) "yak"
函数名函数描述/介绍
ssa.GetSSAProjectByID
ssa.GetSSAProjectByNameAndURL
ssa.NewConfig
ssa.NewFromProgramName
ssa.NewProgramFromDB
ssa.NewResultFromDB
ssa.NewSSAProject
ssa.Parse
ssa.ParseLocalProject
ssa.ParseProject
ssa.YaklangScriptChecking
ssa.withCodeSourceBranch
ssa.withCodeSourceKind
ssa.withCodeSourceLocalFile
ssa.withCodeSourcePath
ssa.withCodeSourceURL
ssa.withConcurrency
ssa.withConfigInfo
ssa.withContext
ssa.withDefaultExcludeFunc
ssa.withDescription
ssa.withEntryFile
ssa.withExcludeFile
ssa.withExternLib
ssa.withExternValue
ssa.withJsonRawConfig
ssa.withLanguage
ssa.withMemory
ssa.withPeepholeSize
ssa.withProcess
ssa.withProgramName
ssa.withProjectDescription
ssa.withProjectID
ssa.withProjectLanguage
ssa.withProjectName
ssa.withProjectTags
ssa.withReCompile
ssa.withStrictMode

函数定义#

GetSSAProjectByID#

详细描述#

定义#

GetSSAProjectByID(id uint) (*SSAProject, error)

参数#

参数名参数类型参数解释
iduint

返回值#

返回值(顺序)返回值类型返回值解释
r1*SSAProject
r2error

GetSSAProjectByNameAndURL#

详细描述#

定义#

GetSSAProjectByNameAndURL(projectName string, url string) (*SSAProject, error)

参数#

参数名参数类型参数解释
projectNamestring
urlstring

返回值#

返回值(顺序)返回值类型返回值解释
r1*SSAProject
r2error

NewConfig#

详细描述#

定义#

NewConfig(mode Mode, opts ...Option) (*Config, error)

参数#

参数名参数类型参数解释
modeMode
opts...Option

返回值#

返回值(顺序)返回值类型返回值解释
r1*Config
r2error

NewFromProgramName#

详细描述#

定义#

NewFromProgramName(programName string) (p *Program, err error)

参数#

参数名参数类型参数解释
programNamestring

返回值#

返回值(顺序)返回值类型返回值解释
p*Program
errerror

NewProgramFromDB#

详细描述#

定义#

NewProgramFromDB(programName string) (p *Program, err error)

参数#

参数名参数类型参数解释
programNamestring

返回值#

返回值(顺序)返回值类型返回值解释
p*Program
errerror

NewResultFromDB#

详细描述#

定义#

NewResultFromDB(resultID uint, force ...bool) (*SyntaxFlowResult, error)

参数#

参数名参数类型参数解释
resultIDuint
force...bool

返回值#

返回值(顺序)返回值类型返回值解释
r1*SyntaxFlowResult
r2error

NewSSAProject#

详细描述#

定义#

NewSSAProject(opts ...ssaconfig.Option) (*SSAProject, error)

参数#

参数名参数类型参数解释
opts...ssaconfig.Option

返回值#

返回值(顺序)返回值类型返回值解释
r1*SSAProject
r2error

Parse#

详细描述#

定义#

Parse(code string, opts ...ssaconfig.Option) (*Program, error)

参数#

参数名参数类型参数解释
codestring
opts...ssaconfig.Option

返回值#

返回值(顺序)返回值类型返回值解释
r1*Program
r2error

ParseLocalProject#

详细描述#

定义#

ParseLocalProject(path string, opts ...ssaconfig.Option) (Programs, error)

参数#

参数名参数类型参数解释
pathstring
opts...ssaconfig.Option

返回值#

返回值(顺序)返回值类型返回值解释
r1Programs
r2error

ParseProject#

详细描述#

定义#

ParseProject(opts ...ssaconfig.Option) (prog Programs, err error)

参数#

参数名参数类型参数解释
opts...ssaconfig.Option

返回值#

返回值(顺序)返回值类型返回值解释
progPrograms
errerror

YaklangScriptChecking#

详细描述#

定义#

YaklangScriptChecking(code string, pluginType string) []*result.StaticAnalyzeResult

参数#

参数名参数类型参数解释
codestring
pluginTypestring

返回值#

返回值(顺序)返回值类型返回值解释
r1[]*result.StaticAnalyzeResult

withCodeSourceBranch#

详细描述#

定义#

withCodeSourceBranch(branch string) Option

参数#

参数名参数类型参数解释
branchstring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withCodeSourceKind#

详细描述#

定义#

withCodeSourceKind(kind CodeSourceKind) Option

参数#

参数名参数类型参数解释
kindCodeSourceKind

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withCodeSourceLocalFile#

详细描述#

定义#

withCodeSourceLocalFile(localFile string) Option

参数#

参数名参数类型参数解释
localFilestring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withCodeSourcePath#

详细描述#

定义#

withCodeSourcePath(path string) Option

参数#

参数名参数类型参数解释
pathstring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withCodeSourceURL#

详细描述#

定义#

withCodeSourceURL(url string) Option

参数#

参数名参数类型参数解释
urlstring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withConcurrency#

详细描述#

定义#

withConcurrency(concurrency int) Option

参数#

参数名参数类型参数解释
concurrencyint

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withConfigInfo#

详细描述#

定义#

withConfigInfo(input map[string]any) Option

参数#

参数名参数类型参数解释
inputmap[string]any

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withContext#

详细描述#

定义#

withContext(ctx context.Context) Option

参数#

参数名参数类型参数解释
ctxcontext.Context

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withDefaultExcludeFunc#

详细描述#

定义#

withDefaultExcludeFunc(patterns []string) ssaconfig.Option

参数#

参数名参数类型参数解释
patterns[]string

返回值#

返回值(顺序)返回值类型返回值解释
r1ssaconfig.Option

withDescription#

详细描述#

定义#

withDescription(description string) Option

参数#

参数名参数类型参数解释
descriptionstring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withEntryFile#

详细描述#

定义#

withEntryFile(v ...string) ssaconfig.Option

参数#

参数名参数类型参数解释
v...string

返回值#

返回值(顺序)返回值类型返回值解释
r1ssaconfig.Option

withExcludeFile#

详细描述#

定义#

withExcludeFile(value TValue) Option

参数#

参数名参数类型参数解释
valueTValue

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withExternLib#

详细描述#

定义#

withExternLib(name string, table map[string]any) ssaconfig.Option

参数#

参数名参数类型参数解释
namestring
tablemap[string]any

返回值#

返回值(顺序)返回值类型返回值解释
r1ssaconfig.Option

withExternValue#

详细描述#

定义#

withExternValue(value TValue) Option

参数#

参数名参数类型参数解释
valueTValue

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withJsonRawConfig#

详细描述#

定义#

withJsonRawConfig(raw []byte) Option

参数#

参数名参数类型参数解释
raw[]byte

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withLanguage#

详细描述#

定义#

withLanguage(language string) Option

参数#

参数名参数类型参数解释
languagestring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withMemory#

详细描述#

定义#

withMemory(memoryCompile ...bool) Option

参数#

参数名参数类型参数解释
memoryCompile...bool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withPeepholeSize#

详细描述#

定义#

withPeepholeSize(peepholeSize int) Option

参数#

参数名参数类型参数解释
peepholeSizeint

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProcess#

详细描述#

定义#

withProcess(value TValue) Option

参数#

参数名参数类型参数解释
valueTValue

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProgramName#

详细描述#

定义#

withProgramName(programName ...string) Option

参数#

参数名参数类型参数解释
programName...string

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProjectDescription#

详细描述#

定义#

withProjectDescription(s string) Option

参数#

参数名参数类型参数解释
sstring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProjectID#

详细描述#

定义#

withProjectID(projectId uint64) Option

参数#

参数名参数类型参数解释
projectIduint64

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProjectLanguage#

详细描述#

定义#

withProjectLanguage(language Language) Option

参数#

参数名参数类型参数解释
languageLanguage

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProjectName#

详细描述#

定义#

withProjectName(name string) Option

参数#

参数名参数类型参数解释
namestring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProjectTags#

详细描述#

定义#

withProjectTags(tags []string) Option

参数#

参数名参数类型参数解释
tags[]string

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withReCompile#

详细描述#

定义#

withReCompile(reCompile bool) Option

参数#

参数名参数类型参数解释
reCompilebool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withStrictMode#

详细描述#

定义#

withStrictMode(strictMode bool) Option

参数#

参数名参数类型参数解释
strictModebool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option