storage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceReference

type ResourceReference struct {
	ResourceID      string
	FieldPath       string
	ReferencedField string
}

ResourceReference represents a reference found in configuration

type SQLiteStorage added in v0.1.0

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

SQLiteStorage implements types.Storage using SQLite

func NewSQLiteStorage

func NewSQLiteStorage(dbPath string) (*SQLiteStorage, error)

NewSQLiteStorage creates a new SQLite-based storage that implements all storage interfaces

func (*SQLiteStorage) AddDependency added in v0.1.0

func (s *SQLiteStorage) AddDependency(ctx context.Context, edge types.DependencyEdge) error

AddDependency adds a dependency edge, e.g. instance

instance-profile

ec2-role --- Dependencies: 1. from_resource_id = instance; to_resource_id = instance_profile 2. from_resource_id = instance_profile; to_resource_id = ec2-role ec2-role is a dependency for the instance_profile, and instance_profile is a dependent for ec2-role

func (*SQLiteStorage) Close added in v0.1.0

func (s *SQLiteStorage) Close() error

Close closes the database connection

func (*SQLiteStorage) DeleteState added in v0.1.0

func (s *SQLiteStorage) DeleteState(ctx context.Context, id string) error

DeleteState removes a state record by ID and automatically records history if context provided

func (*SQLiteStorage) GetDependencies added in v0.1.0

func (s *SQLiteStorage) GetDependencies(ctx context.Context, resourceID string) ([]types.DependencyEdge, error)

GetDependencies returns all dependencies for a resource, meaning what this resource depends on (what needs to be created before this resource)

func (*SQLiteStorage) GetDependents added in v0.1.0

func (s *SQLiteStorage) GetDependents(ctx context.Context, resourceID string) ([]types.DependencyEdge, error)

GetDependents returns all dependents for a resource, meaning what depends on this resource

func (*SQLiteStorage) GetResourceOperation added in v0.1.0

func (s *SQLiteStorage) GetResourceOperation(ctx context.Context, resourceID string) (*types.ResourceOperation, error)

func (*SQLiteStorage) GetState added in v0.1.0

func (s *SQLiteStorage) GetState(ctx context.Context, id string) (*types.StateRecord, error)

GetState retrieves a state record by ID

func (*SQLiteStorage) GetTimeline added in v0.1.0

GetTimeline returns timeline events based on query parameters with pagination

func (*SQLiteStorage) ListResourceOperations added in v0.1.0

func (s *SQLiteStorage) ListResourceOperations(ctx context.Context, args types.ResourceOperationsArgs) ([]types.ResourceOperation, error)

func (*SQLiteStorage) ListStates added in v0.1.0

func (s *SQLiteStorage) ListStates(ctx context.Context) ([]types.StateRecord, error)

ListStates returns all state records

func (*SQLiteStorage) Migrate added in v0.1.0

func (s *SQLiteStorage) Migrate() error

func (*SQLiteStorage) RemoveDependency added in v0.1.0

func (s *SQLiteStorage) RemoveDependency(ctx context.Context, fromID, toID string) error

RemoveDependency removes a dependency edge

func (*SQLiteStorage) SaveResourceOperation added in v0.1.0

func (s *SQLiteStorage) SaveResourceOperation(ctx context.Context, operation types.ResourceOperation) error

func (*SQLiteStorage) SaveState added in v0.1.0

func (s *SQLiteStorage) SaveState(ctx context.Context, record types.StateRecord) error

SaveState stores a state record and automatically records history if context provided

func (*SQLiteStorage) UpdateState added in v0.1.0

func (s *SQLiteStorage) UpdateState(ctx context.Context, record types.StateRecord) error

UpdateState updates an existing state record

Jump to

Keyboard shortcuts

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