Documentation
¶
Index ¶
- Constants
- Variables
- func GetContextFromData(language model.Language, content []byte, filePath string) (*model.AiContextFile, error)
- func GetContextFromFile(rootDirectory, relativePath string) (*model.AiContextFile, error)
- func GoGetTags(data GetFunctionData) ([]model.Tag, error)
- func JavaGetTags(data GetFunctionData) ([]model.Tag, error)
- func JavaScriptGetTags(data GetFunctionData) ([]model.Tag, error)
- func PythonGetTags(data GetFunctionData) ([]model.Tag, error)
- func TypeScriptGetTags(data GetFunctionData) ([]model.Tag, error)
- type ContextRetriever
- type GetFunctionData
Constants ¶
View Source
const (
CaptureNameIdentifier = "name"
)
Variables ¶
View Source
var GoFunctionsToNotRegister = map[string]struct{}{
"setUp": {},
"tearDown": {},
}
View Source
var GoLibraryToFrameworks = map[string]string{
"gin": "gin",
"echo": "echo",
"fiber": "fiber",
"beego": "beego",
"revel": "revel",
}
View Source
var JavaFunctionsToNotRegister = map[string]struct{}{
"setUp": {},
"tearDown": {},
}
View Source
var JavaLibraryToFrameworks = map[string]string{
"springframework": "spring",
"hibernate": "hibernate",
"jakarta": "jakarta",
"micronaut": "micronaut",
}
View Source
var JavaScriptFunctionsToNotRegister = map[string]struct{}{
"describe": {},
"it": {},
"test": {},
"beforeEach": {},
"afterEach": {},
"beforeAll": {},
"afterAll": {},
}
View Source
var PythonFunctionsToNotRegister = map[string]struct{}{
"setUp": {},
"tearDown": {},
}
View Source
var PythonLibraryToFrameworks = map[string]string{}
View Source
var TypeScriptFunctionsToNotRegister = map[string]struct{}{
"describe": {},
"it": {},
"test": {},
"beforeEach": {},
"afterEach": {},
"beforeAll": {},
"afterAll": {},
}
Functions ¶
func GetContextFromData ¶
func GetContextFromFile ¶
func GetContextFromFile(rootDirectory, relativePath string) (*model.AiContextFile, error)
func JavaScriptGetTags ¶ added in v0.0.10
func JavaScriptGetTags(data GetFunctionData) ([]model.Tag, error)
func TypeScriptGetTags ¶ added in v0.0.12
func TypeScriptGetTags(data GetFunctionData) ([]model.Tag, error)
Types ¶
type ContextRetriever ¶
type ContextRetriever struct {
Language *treesitter.Language
FunctionGetTags func(GetFunctionData) ([]model.Tag, error)
}
type GetFunctionData ¶
type GetFunctionData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.