Documentation
¶
Index ¶
- type Config
- type SQLiteStore
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) Delete(ctx context.Context, id string) error
- func (s *SQLiteStore) List(ctx context.Context, filter map[string]any) ([]*crew.Checkpoint, error)
- func (s *SQLiteStore) Load(ctx context.Context, id string) (*crew.Checkpoint, error)
- func (s *SQLiteStore) Save(ctx context.Context, ckpt *crew.Checkpoint) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
SQLiteStore implements crew.CheckpointStore using a SQLite database.
func New ¶
func New(cfg Config) (*SQLiteStore, error)
New creates a new SQLiteStore with the given configuration.
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
Close closes the database connection.
func (*SQLiteStore) Delete ¶
func (s *SQLiteStore) Delete(ctx context.Context, id string) error
Delete removes a checkpoint by ID.
func (*SQLiteStore) List ¶
func (s *SQLiteStore) List(ctx context.Context, filter map[string]any) ([]*crew.Checkpoint, error)
List returns all checkpoints matching the filter.
func (*SQLiteStore) Load ¶
func (s *SQLiteStore) Load(ctx context.Context, id string) (*crew.Checkpoint, error)
Load retrieves a checkpoint by ID.
func (*SQLiteStore) Save ¶
func (s *SQLiteStore) Save(ctx context.Context, ckpt *crew.Checkpoint) error
Save upserts a checkpoint into the store.
Click to show internal directories.
Click to hide internal directories.