state

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 5 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 for software installation and configuration

func NewManager

func NewManager(fileManager fsx.Manager) *Manager

NewManager creates a new state manager

func (*Manager) Exists

func (m *Manager) Exists(softwareName string, stateType Type) (bool, error)

Exists checks if the state file exists for the given software and state type

func (*Manager) RecordState

func (m *Manager) RecordState(softwareName string, stateType Type, version string) error

RecordState creates a state file for the given software and state type

func (*Manager) RemoveState

func (m *Manager) RemoveState(softwareName string, stateType Type) error

RemoveState removes the state file for the given software and state type

type Type

type Type string

Type represents the type of state being managed

const (
	// TypeInstalled indicates software installation state
	TypeInstalled Type = "installed"
	// TypeConfigured indicates software configuration state
	TypeConfigured Type = "configured"
)

Jump to

Keyboard shortcuts

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