Documentation
¶
Index ¶
- type Modification
- type ReadOnlyLayer
- type ReadOnlyOptions
- type ReadOnlyProvider
- func (rop *ReadOnlyProvider) ClearModificationHistory()
- func (rop *ReadOnlyProvider) Close() error
- func (rop *ReadOnlyProvider) GetBlockedModifications() []Modification
- func (rop *ReadOnlyProvider) GetModificationHistory() []Modification
- func (rop *ReadOnlyProvider) Initialize() error
- func (rop *ReadOnlyProvider) IsModified() bool
- func (rop *ReadOnlyProvider) IsSealed() bool
- func (rop *ReadOnlyProvider) ListVersions() ([]*immutableconfig.ConfigVersion, error)
- func (rop *ReadOnlyProvider) Load(version string) (*immutableconfig.ConfigData, error)
- func (rop *ReadOnlyProvider) ResetModified()
- func (rop *ReadOnlyProvider) Save(config *immutableconfig.ConfigData) (*immutableconfig.ConfigVersion, error)
- func (rop *ReadOnlyProvider) Seal() error
- func (rop *ReadOnlyProvider) SealedAt() time.Time
- func (rop *ReadOnlyProvider) Unseal() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Modification ¶
Modification tracks attempted modifications
type ReadOnlyLayer ¶
type ReadOnlyLayer struct {
// contains filtered or unexported fields
}
ReadOnlyLayer provides an additional abstraction layer for read-only access
func NewReadOnlyLayer ¶
func NewReadOnlyLayer(provider *ReadOnlyProvider) *ReadOnlyLayer
NewReadOnlyLayer creates a new read-only layer
func (*ReadOnlyLayer) Get ¶
func (rol *ReadOnlyLayer) Get(version string) (*immutableconfig.ConfigData, error)
Get retrieves configuration data without allowing modifications
func (*ReadOnlyLayer) GetLatest ¶
func (rol *ReadOnlyLayer) GetLatest() (*immutableconfig.ConfigData, error)
GetLatest retrieves the latest configuration
func (*ReadOnlyLayer) IsSealed ¶
func (rol *ReadOnlyLayer) IsSealed() bool
IsSealed returns whether the layer is sealed
func (*ReadOnlyLayer) ListVersions ¶
func (rol *ReadOnlyLayer) ListVersions() ([]*immutableconfig.ConfigVersion, error)
ListVersions lists all available versions
type ReadOnlyOptions ¶
ReadOnlyOptions for configuring the read-only provider
func DefaultReadOnlyOptions ¶
func DefaultReadOnlyOptions() *ReadOnlyOptions
DefaultReadOnlyOptions returns default read-only options
type ReadOnlyProvider ¶
type ReadOnlyProvider struct {
// contains filtered or unexported fields
}
ReadOnlyProvider wraps a Provider with read-only enforcement
func NewReadOnlyProvider ¶
func NewReadOnlyProvider(provider immutableconfig.Provider, opts *ReadOnlyOptions) *ReadOnlyProvider
NewReadOnlyProvider creates a new read-only provider wrapper
func (*ReadOnlyProvider) ClearModificationHistory ¶
func (rop *ReadOnlyProvider) ClearModificationHistory()
ClearModificationHistory clears the modification history
func (*ReadOnlyProvider) Close ¶
func (rop *ReadOnlyProvider) Close() error
Close closes the underlying provider
func (*ReadOnlyProvider) GetBlockedModifications ¶
func (rop *ReadOnlyProvider) GetBlockedModifications() []Modification
GetBlockedModifications returns only blocked modification attempts
func (*ReadOnlyProvider) GetModificationHistory ¶
func (rop *ReadOnlyProvider) GetModificationHistory() []Modification
GetModificationHistory returns the history of modification attempts
func (*ReadOnlyProvider) Initialize ¶
func (rop *ReadOnlyProvider) Initialize() error
Initialize initializes the underlying provider
func (*ReadOnlyProvider) IsModified ¶
func (rop *ReadOnlyProvider) IsModified() bool
IsModified returns whether modifications have been made since sealing
func (*ReadOnlyProvider) IsSealed ¶
func (rop *ReadOnlyProvider) IsSealed() bool
IsSealed returns whether the filesystem is sealed
func (*ReadOnlyProvider) ListVersions ¶
func (rop *ReadOnlyProvider) ListVersions() ([]*immutableconfig.ConfigVersion, error)
ListVersions lists all versions (allowed in read-only mode)
func (*ReadOnlyProvider) Load ¶
func (rop *ReadOnlyProvider) Load(version string) (*immutableconfig.ConfigData, error)
Load loads a configuration (allowed in read-only mode)
func (*ReadOnlyProvider) ResetModified ¶
func (rop *ReadOnlyProvider) ResetModified()
ResetModified resets the modified flag
func (*ReadOnlyProvider) Save ¶
func (rop *ReadOnlyProvider) Save(config *immutableconfig.ConfigData) (*immutableconfig.ConfigVersion, error)
Save attempts to save a configuration (blocked if sealed)
func (*ReadOnlyProvider) Seal ¶
func (rop *ReadOnlyProvider) Seal() error
Seal seals the filesystem, preventing all future modifications
func (*ReadOnlyProvider) SealedAt ¶
func (rop *ReadOnlyProvider) SealedAt() time.Time
SealedAt returns when the filesystem was sealed
func (*ReadOnlyProvider) Unseal ¶
func (rop *ReadOnlyProvider) Unseal() error
Unseal unseals the filesystem, allowing modifications (admin operation)