search

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2023 Interlynk.io

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var OutputFormatOptions = map[string]bool{
	"filen": true,
	"tooln": true,
	"toolv": true,
	"docn":  true,
	"docv":  true,
	"cpe":   true,
	"purl":  true,
	"pkgn":  true,
	"pkgv":  true,
	"pkgl":  true,
	"specn": true,
	"chkn":  true,
	"chkv":  true,
}

Functions

func Search(s *SearchParams) error

Types

type SearchModules

type SearchModules interface {
	Search(*options.RuntimeOptions, options.SearchOptions) (*results.Result, error)
}

type SearchParams

type SearchParams struct {
	//required
	Ctx  context.Context
	Path string

	//Patterns
	Regexp bool

	//Matching Control
	IgnoreCase  bool
	InvertMatch bool
	DirectDeps  bool

	//Output Control
	License     bool
	Quiet       bool
	Filename    bool
	Json        bool
	PrintErrors bool
	Formats     []string

	//stats Control
	Count bool
	Stats bool

	//Directory Control
	Recurse bool

	//Spec Control
	Spdx bool
	Cdx  bool

	//Resource Control
	Cpus int

	//Search Control
	Name string
	CPE  string
	PURL string
	Hash string
}

func (*SearchParams) BeQuiet

func (s *SearchParams) BeQuiet() bool

func (*SearchParams) CdxOnly

func (s *SearchParams) CdxOnly() bool

func (*SearchParams) Context

func (s *SearchParams) Context() context.Context

func (*SearchParams) CpuToUse

func (s *SearchParams) CpuToUse() int

func (*SearchParams) DoCount

func (s *SearchParams) DoCount() bool

func (*SearchParams) DoDirectDeps

func (s *SearchParams) DoDirectDeps() bool

func (*SearchParams) DoFilename

func (s *SearchParams) DoFilename() bool

func (*SearchParams) DoIgnoreCase

func (s *SearchParams) DoIgnoreCase() bool

func (*SearchParams) DoInverseMatch

func (s *SearchParams) DoInverseMatch() bool

func (*SearchParams) DoJson

func (s *SearchParams) DoJson() bool

func (*SearchParams) DoLicense

func (s *SearchParams) DoLicense() bool

func (*SearchParams) DoPrintErrors

func (s *SearchParams) DoPrintErrors() bool

func (*SearchParams) DoRecurse

func (s *SearchParams) DoRecurse() bool

func (*SearchParams) DoStats

func (s *SearchParams) DoStats() bool

func (*SearchParams) HasOutputFormats added in v0.0.2

func (s *SearchParams) HasOutputFormats() bool

func (*SearchParams) IsRegularExp

func (s *SearchParams) IsRegularExp() bool

func (*SearchParams) RootPath

func (s *SearchParams) RootPath() string

func (*SearchParams) SearchCPE

func (s *SearchParams) SearchCPE() string

func (*SearchParams) SearchHash

func (s *SearchParams) SearchHash() string

func (*SearchParams) SearchName

func (s *SearchParams) SearchName() string

func (*SearchParams) SearchPURL

func (s *SearchParams) SearchPURL() string

func (*SearchParams) SpdxOnly

func (s *SearchParams) SpdxOnly() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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