storage

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DeadLetterFile = "deadletters.jsonl"
View Source
const DependenciesFile = "dependencies.json"

DependenciesFile is the filename for storing dependency graph data.

View Source
const EventsFile = "events.jsonl"
View Source
const MessagingFile = "messaging.yaml"
View Source
const PlanFile = "plan.json"
View Source
const PluginsFile = "plugins.yaml"
View Source
const PolicyFile = "policy.yaml"
View Source
const RatesFile = "rates.yaml"
View Source
const RoadyDir = ".roady"
View Source
const SpecFile = "spec.yaml"
View Source
const SpecLockFile = "spec.lock.json"
View Source
const StateFile = "state.json"
View Source
const TeamFile = "team.yaml"
View Source
const TimeEntriesFile = "time_entries.yaml"
View Source
const UsageFile = "usage.json"
View Source
const WebhookFile = "webhooks.yaml"

Variables

This section is empty.

Functions

This section is empty.

Types

type CodebaseInspector added in v0.4.0

type CodebaseInspector struct{}

CodebaseInspector implements CodeInspector using os and exec calls.

func NewCodebaseInspector added in v0.4.0

func NewCodebaseInspector() *CodebaseInspector

func (*CodebaseInspector) FileExists added in v0.4.0

func (i *CodebaseInspector) FileExists(path string) (bool, error)

func (*CodebaseInspector) FileNotEmpty added in v0.4.0

func (i *CodebaseInspector) FileNotEmpty(path string) (bool, error)

func (*CodebaseInspector) GitStatus added in v0.4.0

func (i *CodebaseInspector) GitStatus(path string) (string, error)

type FileEventStore added in v0.4.0

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

FileEventStore implements EventStore using a JSON Lines file.

func NewFileEventStore added in v0.4.0

func NewFileEventStore(basePath string) (*FileEventStore, error)

NewFileEventStore creates a new file-based event store. The basePath directory is created on first write, not at construction time, to avoid interfering with project initialization checks.

func (*FileEventStore) Append added in v0.4.0

func (s *FileEventStore) Append(event *events.BaseEvent) (err error)

Append adds a new event to the store.

func (*FileEventStore) Count added in v0.4.0

func (s *FileEventStore) Count() (int, error)

Count returns the total number of events.

func (*FileEventStore) GetLastEvent added in v0.4.0

func (s *FileEventStore) GetLastEvent() (*events.BaseEvent, error)

GetLastEvent returns the most recent event.

func (*FileEventStore) LoadAll added in v0.4.0

func (s *FileEventStore) LoadAll() ([]*events.BaseEvent, error)

LoadAll returns all events in chronological order.

func (*FileEventStore) LoadByAggregate added in v0.4.0

func (s *FileEventStore) LoadByAggregate(aggregateType, aggregateID string) ([]*events.BaseEvent, error)

LoadByAggregate returns events for a specific aggregate.

func (*FileEventStore) LoadByType added in v0.4.0

func (s *FileEventStore) LoadByType(eventType string) ([]*events.BaseEvent, error)

LoadByType returns events of a specific type.

func (*FileEventStore) LoadRange added in v0.4.0

func (s *FileEventStore) LoadRange(from, to time.Time) ([]*events.BaseEvent, error)

LoadRange returns events within a time range.

func (*FileEventStore) LoadSince added in v0.4.0

func (s *FileEventStore) LoadSince(since time.Time) ([]*events.BaseEvent, error)

LoadSince returns events that occurred after the given timestamp.

func (*FileEventStore) VerifyIntegrity added in v0.4.0

func (s *FileEventStore) VerifyIntegrity() ([]string, error)

VerifyIntegrity checks the hash chain for tampering.

type FilesystemRepository

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

func NewFilesystemRepository

func NewFilesystemRepository(root string) *FilesystemRepository

func (*FilesystemRepository) AddDependency added in v0.4.0

func (r *FilesystemRepository) AddDependency(dep *dependency.RepoDependency) error

AddDependency adds a single dependency to the stored graph.

func (*FilesystemRepository) GetDependency added in v0.4.0

func (r *FilesystemRepository) GetDependency(depID string) (*dependency.RepoDependency, error)

GetDependency retrieves a specific dependency by ID.

func (*FilesystemRepository) GetPluginConfig added in v0.4.0

func (r *FilesystemRepository) GetPluginConfig(name string) (*plugin.PluginConfig, error)

GetPluginConfig returns a specific plugin configuration by name

func (*FilesystemRepository) GetRepoHealth added in v0.4.0

func (r *FilesystemRepository) GetRepoHealth(repoPath string) (*dependency.RepoHealth, error)

GetRepoHealth retrieves the health status for a repository.

func (*FilesystemRepository) Initialize

func (r *FilesystemRepository) Initialize() error

func (*FilesystemRepository) IsInitialized

func (r *FilesystemRepository) IsInitialized() bool

func (*FilesystemRepository) ListDependencies added in v0.4.0

func (r *FilesystemRepository) ListDependencies() ([]*dependency.RepoDependency, error)

ListDependencies returns all dependencies in the graph.

func (*FilesystemRepository) LoadDependencyGraph added in v0.4.0

func (r *FilesystemRepository) LoadDependencyGraph() (*dependency.DependencyGraph, error)

LoadDependencyGraph loads the dependency graph from storage.

func (*FilesystemRepository) LoadEvents

func (r *FilesystemRepository) LoadEvents() ([]domain.Event, error)

func (*FilesystemRepository) LoadMessagingConfig added in v0.6.0

func (r *FilesystemRepository) LoadMessagingConfig() (*messaging.MessagingConfig, error)

LoadMessagingConfig loads the messaging configuration.

func (*FilesystemRepository) LoadPlan

func (r *FilesystemRepository) LoadPlan() (*planning.Plan, error)

func (*FilesystemRepository) LoadPluginConfigs added in v0.4.0

func (r *FilesystemRepository) LoadPluginConfigs() (*plugin.PluginConfigs, error)

LoadPluginConfigs loads plugin configurations from plugins.yaml

func (*FilesystemRepository) LoadPolicy

func (r *FilesystemRepository) LoadPolicy() (*domain.PolicyConfig, error)

func (*FilesystemRepository) LoadRates added in v0.7.0

func (r *FilesystemRepository) LoadRates() (*billing.RateConfig, error)

LoadRates loads the rate configuration from .roady/rates.yaml.

func (*FilesystemRepository) LoadSpec

func (r *FilesystemRepository) LoadSpec() (*spec.ProductSpec, error)

func (*FilesystemRepository) LoadSpecLock

func (r *FilesystemRepository) LoadSpecLock() (*spec.ProductSpec, error)

func (*FilesystemRepository) LoadState

func (*FilesystemRepository) LoadTeam added in v0.6.0

func (r *FilesystemRepository) LoadTeam() (*team.TeamConfig, error)

func (*FilesystemRepository) LoadTimeEntries added in v0.7.0

func (r *FilesystemRepository) LoadTimeEntries() ([]billing.TimeEntry, error)

LoadTimeEntries loads time entries from .roady/time_entries.yaml.

func (*FilesystemRepository) LoadUsage

func (r *FilesystemRepository) LoadUsage() (*domain.UsageStats, error)

func (*FilesystemRepository) LoadWebhookConfig added in v0.6.0

func (r *FilesystemRepository) LoadWebhookConfig() (*events.WebhookConfig, error)

LoadWebhookConfig loads the webhook configuration from .roady/webhooks.yaml.

func (*FilesystemRepository) RecordEvent

func (r *FilesystemRepository) RecordEvent(event domain.Event) (err error)

func (*FilesystemRepository) RemoveDependency added in v0.4.0

func (r *FilesystemRepository) RemoveDependency(depID string) error

RemoveDependency removes a dependency from the stored graph by ID.

func (*FilesystemRepository) RemovePluginConfig added in v0.4.0

func (r *FilesystemRepository) RemovePluginConfig(name string) error

RemovePluginConfig removes a plugin configuration

func (*FilesystemRepository) ResolvePath

func (r *FilesystemRepository) ResolvePath(filename string) (string, error)

ResolvePath ensures the path is within the .roady directory and prevents traversal.

func (*FilesystemRepository) Root added in v0.6.0

func (r *FilesystemRepository) Root() string

Root returns the workspace root directory.

func (*FilesystemRepository) SaveDependencyGraph added in v0.4.0

func (r *FilesystemRepository) SaveDependencyGraph(graph *dependency.DependencyGraph) error

SaveDependencyGraph persists the dependency graph to storage.

func (*FilesystemRepository) SaveMessagingConfig added in v0.6.0

func (r *FilesystemRepository) SaveMessagingConfig(config *messaging.MessagingConfig) error

SaveMessagingConfig saves the messaging configuration.

func (*FilesystemRepository) SavePlan

func (r *FilesystemRepository) SavePlan(p *planning.Plan) error

func (*FilesystemRepository) SavePluginConfigs added in v0.4.0

func (r *FilesystemRepository) SavePluginConfigs(configs *plugin.PluginConfigs) error

SavePluginConfigs saves the plugin configurations to plugins.yaml

func (*FilesystemRepository) SavePolicy

func (r *FilesystemRepository) SavePolicy(cfg *domain.PolicyConfig) error

func (*FilesystemRepository) SaveRates added in v0.7.0

func (r *FilesystemRepository) SaveRates(config *billing.RateConfig) error

SaveRates saves the rate configuration to .roady/rates.yaml.

func (*FilesystemRepository) SaveSpec

func (r *FilesystemRepository) SaveSpec(s *spec.ProductSpec) error

func (*FilesystemRepository) SaveSpecLock

func (r *FilesystemRepository) SaveSpecLock(s *spec.ProductSpec) error

func (*FilesystemRepository) SaveState

func (*FilesystemRepository) SaveTeam added in v0.6.0

func (r *FilesystemRepository) SaveTeam(cfg *team.TeamConfig) error

func (*FilesystemRepository) SaveTimeEntries added in v0.7.0

func (r *FilesystemRepository) SaveTimeEntries(entries []billing.TimeEntry) error

SaveTimeEntries saves time entries to .roady/time_entries.yaml.

func (*FilesystemRepository) SaveWebhookConfig added in v0.6.0

func (r *FilesystemRepository) SaveWebhookConfig(config *events.WebhookConfig) error

SaveWebhookConfig saves the webhook configuration to .roady/webhooks.yaml.

func (*FilesystemRepository) SetPluginConfig added in v0.4.0

func (r *FilesystemRepository) SetPluginConfig(name string, cfg plugin.PluginConfig) error

SetPluginConfig adds or updates a plugin configuration

func (*FilesystemRepository) UpdateRepoHealth added in v0.4.0

func (r *FilesystemRepository) UpdateRepoHealth(health *dependency.RepoHealth) error

UpdateRepoHealth updates the health status for a repository in the graph.

func (*FilesystemRepository) UpdateUsage

func (r *FilesystemRepository) UpdateUsage(stats domain.UsageStats) error

type InMemoryEventPublisher added in v0.4.0

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

InMemoryEventPublisher is a simple in-process event publisher.

func NewInMemoryEventPublisher added in v0.4.0

func NewInMemoryEventPublisher() *InMemoryEventPublisher

NewInMemoryEventPublisher creates a new in-memory publisher.

func (*InMemoryEventPublisher) Publish added in v0.4.0

func (p *InMemoryEventPublisher) Publish(event *events.BaseEvent) error

Publish sends an event to all subscribers.

func (*InMemoryEventPublisher) Subscribe added in v0.4.0

func (p *InMemoryEventPublisher) Subscribe(handler events.EventHandler)

Subscribe registers a handler for events.

Jump to

Keyboard shortcuts

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