storage

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetStateHistoryOptions added in v0.0.23

type GetStateHistoryOptions struct {
	Names []string // State names to filter by (empty = all states)
	Days  int      // Number of days of history (default: 30)
}

type HappeningListOptions added in v0.0.15

type HappeningListOptions struct {
	Filter    string
	SortBy    string
	SortOrder string
	Limit     int
	Offset    int
}

type HappeningService added in v0.0.15

type HappeningService interface {
	List(options HappeningListOptions) ([]*models.Happening, int64, error)
	Add(ctx context.Context, happening *models.Happening) (*models.Happening, error)
	Update(ctx context.Context, id int64, update *models.HappeningOptional) (*models.Happening, error)
	Delete(ctx context.Context, id int64) error
}

type LogEntryListOptions

type LogEntryListOptions struct {
	Filter         string
	SortBy         string
	SortOrder      string
	Limit          int
	Offset         int
	Status         string
	IncludeHistory bool
}

type LogEntryService

type LogEntryService interface {
	List(options LogEntryListOptions) ([]models.LogEntry, int64, error)
	Add(entry models.LogEntry) (int64, error)
	Delete(id int64) error
	Update(id int64, update models.LogEntryOptional) error
	Move(id int64, newParentID int64) error
	// GetTree loads all descendants of a given root ID, with optional history entries
	GetTree(ctx context.Context, id int64, includeHistory bool) ([]models.LogEntry, error)
}

type LogNoteListOptions

type LogNoteListOptions struct {
	Filter    string
	SortBy    string
	SortOrder string
	Limit     int
	Offset    int
}

type LogNoteService

type LogNoteService interface {
	List(entryID int64, options LogNoteListOptions) ([]models.Note, int64, error)
	ListForEntries(entryIDs []int64) (map[int64][]models.Note, error)
	Add(entryID int64, note models.Note) (int64, error)
	Delete(entryID int64, noteID int64) error
	Update(entryID int64, noteID int64, update models.NoteOptional) error
}

type StateRecordingService added in v0.0.16

type StateRecordingService interface {
	// GetState retrieves a state record by name
	GetState(ctx context.Context, name string) (*models.State, error)
	// RecordStateEvent records a state event with delta score, updates the state score, and logs the event
	RecordStateEvent(ctx context.Context, name string, deltaScore float64) error
	// CreateState creates a new state record
	CreateState(ctx context.Context, state *models.State) (*models.State, error)
	// ListStates lists all state records with optional filtering
	ListStates(ctx context.Context, scope string) ([]*models.State, error)
	// GetStateEvents retrieves events for a specific state
	GetStateEvents(ctx context.Context, stateID int64, limit int) ([]*models.StateEvent, error)
	// GetStateHistory retrieves historical data points for states
	GetStateHistory(ctx context.Context, options GetStateHistoryOptions) ([]models.StateHistoryPoint, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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