analyzer

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpenAPIRegex     = regexp.MustCompile(`("(openapi|swagger)"|(openapi|swagger))\s*:`)
	OpenAPIRegexInfo = regexp.MustCompile(`("info"|info)\s*:`)
	OpenAPIRegexPath = regexp.MustCompile(`("(paths|components|webhooks)"|(paths|components|webhooks))\s*:`)
)

move the openApi regex to public to be used on file.go openAPIRegex - Regex that finds OpenAPI defining property "openapi" or "swagger" openAPIRegexInfo - Regex that finds OpenAPI defining property "info" openAPIRegexPath - Regex that finds OpenAPI defining property "paths", "components", or "webhooks" (from 3.1.0) cloudRegex - Regex that finds CloudFormation defining property "Resources" k8sRegex - Regex that finds Kubernetes defining property "apiVersion" k8sRegexKind - Regex that finds Kubernetes defining property "kind" k8sRegexMetadata - Regex that finds Kubernetes defining property "metadata" k8sRegexSpec - Regex that finds Kubernetes defining property "spec"

Functions

func Analyze

func Analyze(a *Analyzer) (model.AnalyzedPaths, error)

Analyze will go through the slice paths given and determine what type of queries should be loaded should be loaded based on the extension of the file and the content

Types

type Analyzer added in v1.6.0

type Analyzer struct {
	Paths             []string
	Types             []string
	ExcludeTypes      []string
	Exc               []string
	GitIgnoreFileName string
	ExcludeGitIgnore  bool
	MaxFileSize       int
}

Analyzer keeps all the relevant info for the function Analyze

type Parameters added in v1.7.6

type Parameters struct {
	Results     string
	Path        []string
	MaxFileSize int
}

Jump to

Keyboard shortcuts

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