analysis

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

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 FindUsage

func FindUsage(entrypoint string, usage []string, deepLevel int) []string

FindUsage will retrieve the list of file paths where your entrypoint is used

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

Jump to

Keyboard shortcuts

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