profiles

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package profiles provides scanning profile management for scanorama. It handles predefined and custom scanning configurations, port lists, and scanning methodologies for different use cases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager handles scan profile operations.

func NewManager

func NewManager(database *db.DB) *Manager

NewManager creates a new profile manager.

func (*Manager) CloneProfile

func (m *Manager) CloneProfile(ctx context.Context, sourceID, newID, newName string) error

CloneProfile creates a copy of an existing profile with a new ID.

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, profile *db.ScanProfile) error

Create creates a new custom scan profile.

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, id string) error

Delete deletes a custom scan profile.

func (*Manager) GetAll

func (m *Manager) GetAll(ctx context.Context) ([]*db.ScanProfile, error)

GetAll returns all scan profiles.

func (*Manager) GetByID

func (m *Manager) GetByID(ctx context.Context, id string) (*db.ScanProfile, error)

GetByID returns a profile by ID.

func (*Manager) GetByOSFamily

func (m *Manager) GetByOSFamily(ctx context.Context, osFamily string) ([]*db.ScanProfile, error)

GetByOSFamily returns profiles matching the OS family.

func (*Manager) GetProfileStats

func (m *Manager) GetProfileStats(ctx context.Context) (map[string]int, error)

GetProfileStats returns statistics about profile usage.

func (*Manager) SelectBestProfile

func (m *Manager) SelectBestProfile(ctx context.Context, host *db.Host) (*db.ScanProfile, error)

SelectBestProfile selects the best profile for a host based on OS information.

func (*Manager) Update

func (m *Manager) Update(ctx context.Context, profile *db.ScanProfile) error

Update updates an existing scan profile.

func (*Manager) ValidateProfile

func (m *Manager) ValidateProfile(profile *db.ScanProfile) error

ValidateProfile validates a scan profile configuration.

Jump to

Keyboard shortcuts

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