command

package
v0.0.0-...-1fb2453 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const DoTrust = "Trust folders and continue"
View Source
const DontTrust = "Don't trust folders"

Variables

This section is empty.

Functions

func CreateFromCommandData

func CreateFromCommandData(
	c *config.Config,
	commandData types.CommandData,
	srv types.Server,
	authService authentication.AuthenticationService,
	learnService learn.Service,
	notifier noti.Notifier,
	issueProvider snyk.IssueProvider,
	codeApiClient SnykCodeHttpClient,
	codeScanner *code.Scanner,
	cli cli.Executor,
) (types.Command, error)

CreateFromCommandData gets a command based on the given parameters that can be passed to the CommandService nolint: gocyclo, nolintlint // this is a factory, it's ok to have high cyclomatic complexity here

func GetTrustMessage

func GetTrustMessage(untrusted []types.Folder) string

func HandleFolders

func HandleFolders(ctx context.Context, srv types.Server, notifier noti.Notifier, persister persistence.ScanSnapshotPersister)

func HandleUntrustedFolders

func HandleUntrustedFolders(ctx context.Context, srv types.Server)

func NewService

func NewService(authService authentication.AuthenticationService, notifier noti.Notifier, learnService learn.Service, issueProvider snyk.IssueProvider, codeApiClient SnykCodeHttpClient, codeScanner *code.Scanner, cli cli.Executor) types.CommandService

func Service

func Service() types.CommandService

Service returns the singleton instance of the command service. If not already created, it will create a new instance.

func SetService

func SetService(service types.CommandService)

SetService sets the singleton instance of the command service.

Types

type RangeDto

type RangeDto = map[string]interface{}

type RangePositionDto

type RangePositionDto = map[string]interface{}

type SnykCodeHttpClient

type SnykCodeHttpClient interface {
	SubmitAutofixFeedback(ctx context.Context, fixId string, positive string) error
}

Jump to

Keyboard shortcuts

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