Documentation ¶
Index ¶
- Constants
- Variables
- func FindUsage(entrypoint string, usage []string, deepLevel int) []string
- func InitAnalysisService(ext string)
- type BaseAnalysisInterface
- type DefaultAnalysis
- func (a DefaultAnalysis) ExtractImportUsage(text string) (res string, err error)
- func (a DefaultAnalysis) ExtractMainEntrypointSrc(text string) (res string, err error)
- func (a DefaultAnalysis) FindMainEntrypointTitle(text string) (res string, err error)
- func (a DefaultAnalysis) GenerateEntryPointSrc(src string, entrypointTitle string) string
- func (a DefaultAnalysis) GetNeedleKey() string
- type PhpAnalysis
- func (a PhpAnalysis) ExtractImportUsage(text string) (res string, err error)
- func (a PhpAnalysis) ExtractMainEntrypointSrc(text string) (res string, err error)
- func (a PhpAnalysis) FindMainEntrypointTitle(text string) (res string, err error)
- func (a PhpAnalysis) GenerateEntryPointSrc(src string, entrypointTitle string) string
- func (a PhpAnalysis) GetNeedleKey() string
Constants ¶
View Source
const DefaultMaxDeepLevel = 2
Variables ¶
View Source
var ( //AnalysedEntrypointsIndex this index will be used for finding of the information about the main entrypoint by the entrypoint name AnalysedEntrypointsIndex = map[string]dto.IndexedFile{} //AnalysedPathsIndex this index will be used for finding of the information about the main entrypoint by the entrypoint path AnalysedPathsIndex = map[string]dto.IndexedFile{} //AnalysedImportsIndex will be used for indexing of other imports used in your object AnalysedImportsIndex = map[string][]string{} MaxDeepLevel = DefaultMaxDeepLevel An BaseAnalysisInterface )
Functions ¶
func InitAnalysisService ¶ added in v1.1.4
func InitAnalysisService(ext string)
Types ¶
type BaseAnalysisInterface ¶
type BaseAnalysisInterface interface { GetNeedleKey() string //ExtractMainEntrypointSrc method retrieves the entrypoint src from selected text string. This string will be used for main entrypoint path generation. ExtractMainEntrypointSrc(text string) (string, error) //ExtractImportUsage retrieves the import-src from selected text string. This will be used in the functionality where we get information about usage of the file. ExtractImportUsage(text string) (string, error) //FindMainEntrypointTitle method returns the main entrypoint title string from selected text string FindMainEntrypointTitle(text string) (string, error) //GenerateEntryPointSrc generates the entrypoint src string based on received src and entrypoint title GenerateEntryPointSrc(src string, entrypointTitle string) string }
BaseAnalysisInterface interface which will be used for objects which will help to find the features and namespaces
type DefaultAnalysis ¶
type DefaultAnalysis struct { }
DefaultAnalysis the default analysis struct
func (DefaultAnalysis) ExtractImportUsage ¶
func (a DefaultAnalysis) ExtractImportUsage(text string) (res string, err error)
func (DefaultAnalysis) ExtractMainEntrypointSrc ¶
func (a DefaultAnalysis) ExtractMainEntrypointSrc(text string) (res string, err error)
func (DefaultAnalysis) FindMainEntrypointTitle ¶
func (a DefaultAnalysis) FindMainEntrypointTitle(text string) (res string, err error)
func (DefaultAnalysis) GenerateEntryPointSrc ¶
func (a DefaultAnalysis) GenerateEntryPointSrc(src string, entrypointTitle string) string
func (DefaultAnalysis) GetNeedleKey ¶
func (a DefaultAnalysis) GetNeedleKey() string
type PhpAnalysis ¶
type PhpAnalysis struct { }
PhpAnalysis the default analysis struct
func (PhpAnalysis) ExtractImportUsage ¶
func (a PhpAnalysis) ExtractImportUsage(text string) (res string, err error)
func (PhpAnalysis) ExtractMainEntrypointSrc ¶
func (a PhpAnalysis) ExtractMainEntrypointSrc(text string) (res string, err error)
func (PhpAnalysis) FindMainEntrypointTitle ¶
func (a PhpAnalysis) FindMainEntrypointTitle(text string) (res string, err error)
func (PhpAnalysis) GenerateEntryPointSrc ¶
func (a PhpAnalysis) GenerateEntryPointSrc(src string, entrypointTitle string) string
func (PhpAnalysis) GetNeedleKey ¶
func (a PhpAnalysis) GetNeedleKey() string
Click to show internal directories.
Click to hide internal directories.