Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/pkg/catalog/catalog.go
2070 views
1
package catalog
2
3
import "io"
4
5
// Catalog is a catalog storage implementations
6
type Catalog interface {
7
// OpenFile opens a file and returns an io.ReadCloser to the file.
8
// It is used to read template and payload files based on catalog responses.
9
OpenFile(filename string) (io.ReadCloser, error)
10
// GetTemplatePath parses the specified input template path and returns a compiled
11
// list of finished absolute paths to the templates evaluating any glob patterns
12
// or folders provided as in.
13
GetTemplatePath(target string) ([]string, error)
14
// GetTemplatesPath returns a list of absolute paths for the provided template list.
15
GetTemplatesPath(definitions []string) ([]string, map[string]error)
16
// ResolvePath resolves the path to an absolute one in various ways.
17
//
18
// It checks if the filename is an absolute path, looks in the current directory
19
// or checking the nuclei templates directory. If a second path is given,
20
// it also tries to find paths relative to that second path.
21
ResolvePath(templateName, second string) (string, error)
22
}
23
24