persistent

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PersistentConfig

type PersistentConfig struct {
	// Verbose settings
	VerboseLevel   logger.LogLevel `yaml:"verbose_level" json:"verbose_level"`
	VerboseEnabled bool            `yaml:"verbose_enabled" json:"verbose_enabled"`

	// Clean settings
	CleanEnabled bool `yaml:"clean_enabled" json:"clean_enabled"`

	// Debug settings
	DebugEnabled bool   `yaml:"debug_enabled" json:"debug_enabled"`
	DebugOutput  string `yaml:"debug_output" json:"debug_output"`

	// Force settings
	ForceEnabled bool `yaml:"force_enabled" json:"force_enabled"`

	// Metadata
	LastUpdated time.Time `yaml:"last_updated" json:"last_updated"`
	Version     string    `yaml:"version" json:"version"`
}

PersistentConfig represents the persistent configuration for AutoPDF CLI

func DefaultPersistentConfig

func DefaultPersistentConfig() *PersistentConfig

DefaultPersistentConfig returns the default persistent configuration

func (*PersistentConfig) GetStatus

func (pc *PersistentConfig) GetStatus() map[string]interface{}

GetStatus returns a status summary of all settings

func (*PersistentConfig) GetVerboseDescription

func (pc *PersistentConfig) GetVerboseDescription() string

GetVerboseDescription returns a human-readable description of the verbose level

func (*PersistentConfig) SetCleanEnabled

func (pc *PersistentConfig) SetCleanEnabled(enabled bool)

SetCleanEnabled sets the clean setting

func (*PersistentConfig) SetDebugEnabled

func (pc *PersistentConfig) SetDebugEnabled(enabled bool, output string)

SetDebugEnabled sets the debug setting

func (*PersistentConfig) SetForceEnabled

func (pc *PersistentConfig) SetForceEnabled(enabled bool)

SetForceEnabled sets the force setting

func (*PersistentConfig) SetVerboseLevel

func (pc *PersistentConfig) SetVerboseLevel(level logger.LogLevel)

SetVerboseLevel sets the verbose level and marks as enabled

func (*PersistentConfig) ToggleClean

func (pc *PersistentConfig) ToggleClean() bool

ToggleClean toggles the clean setting

func (*PersistentConfig) ToggleDebug

func (pc *PersistentConfig) ToggleDebug() bool

ToggleDebug toggles the debug setting

func (*PersistentConfig) ToggleForce

func (pc *PersistentConfig) ToggleForce() bool

ToggleForce toggles the force setting

type PersistentService

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

PersistentService handles persistent configuration using Bonzai persisters

func NewPersistentService

func NewPersistentService() *PersistentService

NewPersistentService creates a new persistent service

func (*PersistentService) ExportConfig

func (ps *PersistentService) ExportConfig(path string) error

ExportConfig exports the current configuration to a file

func (*PersistentService) GetCleanEnabled

func (ps *PersistentService) GetCleanEnabled() bool

GetCleanEnabled returns the current clean setting

func (*PersistentService) GetConfig

func (ps *PersistentService) GetConfig() *PersistentConfig

GetConfig returns the current persistent configuration

func (*PersistentService) GetConfigPath

func (ps *PersistentService) GetConfigPath() string

GetConfigPath returns the path to the configuration file

func (*PersistentService) GetDebugEnabled

func (ps *PersistentService) GetDebugEnabled() bool

GetDebugEnabled returns the current debug setting

func (*PersistentService) GetForceEnabled

func (ps *PersistentService) GetForceEnabled() bool

GetForceEnabled returns the current force setting

func (*PersistentService) GetStatus

func (ps *PersistentService) GetStatus() map[string]interface{}

GetStatus returns the current status of all settings

func (*PersistentService) GetVerboseLevel

func (ps *PersistentService) GetVerboseLevel() logger.LogLevel

GetVerboseLevel returns the current verbose level

func (*PersistentService) ImportConfig

func (ps *PersistentService) ImportConfig(path string) error

ImportConfig imports configuration from a file

func (*PersistentService) LoadFromFile

func (ps *PersistentService) LoadFromFile() error

LoadFromFile loads configuration from the persistent file

func (*PersistentService) ResetToDefaults

func (ps *PersistentService) ResetToDefaults() error

ResetToDefaults resets all settings to defaults and persists them

func (*PersistentService) SaveConfig

func (ps *PersistentService) SaveConfig() error

SaveConfig saves the current configuration to persistent storage

func (*PersistentService) SetCleanEnabled

func (ps *PersistentService) SetCleanEnabled(enabled bool) error

SetCleanEnabled sets the clean setting and persists it

func (*PersistentService) SetDebugEnabled

func (ps *PersistentService) SetDebugEnabled(enabled bool, output string) error

SetDebugEnabled sets the debug setting and persists it

func (*PersistentService) SetForceEnabled

func (ps *PersistentService) SetForceEnabled(enabled bool) error

SetForceEnabled sets the force setting and persists it

func (*PersistentService) SetVerboseLevel

func (ps *PersistentService) SetVerboseLevel(level logger.LogLevel) error

SetVerboseLevel sets the verbose level and persists it

func (*PersistentService) ToggleClean

func (ps *PersistentService) ToggleClean() (bool, error)

ToggleClean toggles the clean setting and persists it

func (*PersistentService) ToggleDebug

func (ps *PersistentService) ToggleDebug() (bool, error)

ToggleDebug toggles the debug setting and persists it

func (*PersistentService) ToggleForce

func (ps *PersistentService) ToggleForce() (bool, error)

ToggleForce toggles the force setting and persists it

Jump to

Keyboard shortcuts

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