service

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentService

type ComponentService interface {
	GetComponentByPath(filePath string) (entities.ComponentDTO, error)
	FilterComponents(dto []entities.ComponentFilterDTO) error
	Undo() error
	Redo() error
	CanUndo() bool
	CanRedo() bool
	GetDeclaredComponents() ([]entities.DeclaredComponent, error)
	SearchComponents(request entities.ComponentSearchRequest) (entities.ComponentSearchResponse, error)
}

type ComponentServiceImpl

type ComponentServiceImpl struct {
	// contains filtered or unexported fields
}

func (*ComponentServiceImpl) CanRedo

func (s *ComponentServiceImpl) CanRedo() bool

func (*ComponentServiceImpl) CanUndo

func (s *ComponentServiceImpl) CanUndo() bool

func (*ComponentServiceImpl) ClearAllFilters

func (s *ComponentServiceImpl) ClearAllFilters() error

func (*ComponentServiceImpl) FilterComponents

func (s *ComponentServiceImpl) FilterComponents(dto []entities.ComponentFilterDTO) error

func (*ComponentServiceImpl) GetComponentByPath

func (s *ComponentServiceImpl) GetComponentByPath(filePath string) (entities.ComponentDTO, error)

func (*ComponentServiceImpl) GetDeclaredComponents

func (s *ComponentServiceImpl) GetDeclaredComponents() ([]entities.DeclaredComponent, error)

func (*ComponentServiceImpl) GetInitialFilters

func (s *ComponentServiceImpl) GetInitialFilters() entities.InitialFilters

func (*ComponentServiceImpl) Redo

func (s *ComponentServiceImpl) Redo() error

func (*ComponentServiceImpl) SearchComponents added in v0.8.0

Searches for components using the SCANOSS API

func (*ComponentServiceImpl) Undo

func (s *ComponentServiceImpl) Undo() error

type FileService

type FileService interface {
	GetRemoteFile(path string) (entities.FileDTO, error)
	GetLocalFile(path string) (entities.FileDTO, error)
}

func NewFileService

func NewFileService(repo repository.FileRepository, componentRepo repository.ComponentRepository) FileService

type FileServiceImpl

type FileServiceImpl struct {
	// contains filtered or unexported fields
}

func (*FileServiceImpl) GetLocalFile

func (c *FileServiceImpl) GetLocalFile(path string) (entities.FileDTO, error)

func (*FileServiceImpl) GetRemoteFile

func (c *FileServiceImpl) GetRemoteFile(path string) (entities.FileDTO, error)

type HTTPClient added in v0.8.0

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type KeyboardService

type KeyboardService interface {
	GetShortcuts() []entities.Shortcut
	GetGroupedShortcuts() map[entities.Group][]entities.Shortcut
}

func NewKeyboardServiceInMemoryImpl

func NewKeyboardServiceInMemoryImpl() KeyboardService

type KeyboardServiceInMemoryImpl

type KeyboardServiceInMemoryImpl struct {
}

func (*KeyboardServiceInMemoryImpl) GetGroupedShortcuts

func (k *KeyboardServiceInMemoryImpl) GetGroupedShortcuts() map[entities.Group][]entities.Shortcut

func (*KeyboardServiceInMemoryImpl) GetShortcuts

func (k *KeyboardServiceInMemoryImpl) GetShortcuts() []entities.Shortcut

type LicenseService

type LicenseService interface {
	GetAll() ([]entities.License, error)
	GetLicensesByPurl(request entities.ComponentRequest) (entities.GetLicensesByPurlResponse, error)
}

func NewLicenseServiceImpl

func NewLicenseServiceImpl(repo repository.LicenseRepository, scanossApiService ScanossApiService) LicenseService

type LicenseServiceImpl

type LicenseServiceImpl struct {
	// contains filtered or unexported fields
}

func (*LicenseServiceImpl) GetAll

func (s *LicenseServiceImpl) GetAll() ([]entities.License, error)

func (*LicenseServiceImpl) GetLicensesByPurl added in v0.8.0

type QueryParams added in v0.8.0

type QueryParams map[string]string

type ResultService

type ResultService interface {
	GetAll(dto *entities.RequestResultDTO) ([]entities.ResultDTO, error)
	GetByPath(path string) entities.ResultDTO
	SetContext(ctx context.Context)
}

type ResultServiceImpl

type ResultServiceImpl struct {
	// contains filtered or unexported fields
}

func (*ResultServiceImpl) GetAll

func (*ResultServiceImpl) GetByPath added in v0.6.5

func (s *ResultServiceImpl) GetByPath(path string) entities.ResultDTO

func (*ResultServiceImpl) SetContext

func (s *ResultServiceImpl) SetContext(ctx context.Context)

type ScanService

type ScanService interface {
	CheckDependencies() error
	GetDefaultScanArgs() []string
	Scan(args []string) error
	ScanStream(args []string) error
	AbortScan() error
}

type ScanServicePythonImpl

type ScanServicePythonImpl struct {
	// contains filtered or unexported fields
}

func NewScanServicePythonImpl

func NewScanServicePythonImpl() *ScanServicePythonImpl

func (*ScanServicePythonImpl) AbortScan added in v0.7.0

func (s *ScanServicePythonImpl) AbortScan() error

func (*ScanServicePythonImpl) CheckDependencies

func (s *ScanServicePythonImpl) CheckDependencies() error

func (*ScanServicePythonImpl) GetDefaultScanArgs

func (s *ScanServicePythonImpl) GetDefaultScanArgs() []string

func (*ScanServicePythonImpl) GetScanArgs added in v0.6.0

func (s *ScanServicePythonImpl) GetScanArgs() []entities.ScanArgDef

func (*ScanServicePythonImpl) GetSensitiveDefaultScanArgs

func (s *ScanServicePythonImpl) GetSensitiveDefaultScanArgs() []string

func (*ScanServicePythonImpl) Scan

func (s *ScanServicePythonImpl) Scan(args []string) error

func (*ScanServicePythonImpl) ScanStream

func (s *ScanServicePythonImpl) ScanStream(args []string) error

func (*ScanServicePythonImpl) SetContext

func (s *ScanServicePythonImpl) SetContext(ctx context.Context)

type ScanossApiService added in v0.8.0

type ScanossApiService interface {
	SearchComponents(request entities.ComponentSearchRequest) (entities.ComponentSearchResponse, error)
	GetLicensesByPurl(request entities.ComponentRequest) (entities.GetLicensesByPurlResponse, error)
	SetContext(ctx context.Context)
}

func NewScanossApiServiceHttpImpl added in v0.8.0

func NewScanossApiServiceHttpImpl() (ScanossApiService, error)

type ScanossApiServiceHttpImpl added in v0.8.0

type ScanossApiServiceHttpImpl struct {
	// contains filtered or unexported fields
}

func (*ScanossApiServiceHttpImpl) GetLicensesByPurl added in v0.8.0

GetLicenseByPurl fetches licenses for a given purl/component combination using the SCANOSS HTTP API

func (*ScanossApiServiceHttpImpl) GetWithParams added in v0.8.0

func (s *ScanossApiServiceHttpImpl) GetWithParams(ctx context.Context, endpoint string, params QueryParams) (*http.Response, error)

func (*ScanossApiServiceHttpImpl) SearchComponents added in v0.8.0

SearchComponents searches for components using the SCANOSS HTTP API

func (*ScanossApiServiceHttpImpl) SetContext added in v0.8.0

func (s *ScanossApiServiceHttpImpl) SetContext(ctx context.Context)

type ScanossSettingsService

type ScanossSettingsService interface {
	Save() error
	HasUnsavedChanges() (bool, error)
	AddStagedScanningSkipPattern(pattern string) error
	RemoveStagedScanningSkipPattern(path string, pattern string) error
	CommitStagedScanningSkipPatterns() error
	DiscardStagedScanningSkipPatterns() error
	HasStagedScanningSkipPatternChanges() bool
}

type ScanossSettingsServiceImp

type ScanossSettingsServiceImp struct {
	// contains filtered or unexported fields
}

func (*ScanossSettingsServiceImp) AddStagedScanningSkipPattern added in v0.6.5

func (s *ScanossSettingsServiceImp) AddStagedScanningSkipPattern(pattern string) error

func (*ScanossSettingsServiceImp) CommitStagedScanningSkipPatterns added in v0.6.5

func (s *ScanossSettingsServiceImp) CommitStagedScanningSkipPatterns() error

func (*ScanossSettingsServiceImp) DiscardStagedScanningSkipPatterns added in v0.6.5

func (s *ScanossSettingsServiceImp) DiscardStagedScanningSkipPatterns() error

func (*ScanossSettingsServiceImp) GetSettings

func (*ScanossSettingsServiceImp) HasStagedScanningSkipPatternChanges added in v0.6.5

func (s *ScanossSettingsServiceImp) HasStagedScanningSkipPatternChanges() bool

func (*ScanossSettingsServiceImp) HasUnsavedChanges

func (s *ScanossSettingsServiceImp) HasUnsavedChanges() (bool, error)

func (*ScanossSettingsServiceImp) RemoveStagedScanningSkipPattern added in v0.6.5

func (s *ScanossSettingsServiceImp) RemoveStagedScanningSkipPattern(path string, pattern string) error

func (*ScanossSettingsServiceImp) Save

func (s *ScanossSettingsServiceImp) Save() error

type TreeService added in v0.6.5

type TreeService interface {
	GetTree(rootPath string) ([]entities.TreeNode, error)
}

type TreeServiceImpl added in v0.6.5

type TreeServiceImpl struct {
	// contains filtered or unexported fields
}

func NewTreeServiceImpl added in v0.6.5

func NewTreeServiceImpl(resultService ResultService, scanossSettingsRepo repository.ScanossSettingsRepository) *TreeServiceImpl

func (*TreeServiceImpl) GetTree added in v0.6.5

func (s *TreeServiceImpl) GetTree(rootPath string) ([]entities.TreeNode, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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