state

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

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 state persistence

func NewManager

func NewManager() (*Manager, error)

NewManager creates a new state manager

func (*Manager) Exists

func (m *Manager) Exists() bool

Exists checks if a state file exists

func (*Manager) GetAge

func (m *Manager) GetAge() (time.Duration, error)

GetAge returns how old the state is

func (*Manager) GetPath

func (m *Manager) GetPath() string

GetPath returns the state file path

func (*Manager) IsStale

func (m *Manager) IsStale(maxAge time.Duration) (bool, error)

IsStale checks if state is older than the given duration

func (*Manager) Load

func (m *Manager) Load() (*models.ScanResult, error)

Load loads scan results from state file

func (*Manager) Save

func (m *Manager) Save(result *models.ScanResult) error

Save saves scan results to state file

Jump to

Keyboard shortcuts

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