Documentation
¶
Index ¶
- func LoadConfig() (*models.Config, error)
- func SaveConfig(conf *models.Config) error
- type HappeningManager
- func (hm *HappeningManager) AddHappening(ctx context.Context, content string) (*models.Happening, error)
- func (hm *HappeningManager) DeleteHappening(ctx context.Context, id int64) error
- func (hm *HappeningManager) InvalidateCache()
- func (hm *HappeningManager) LoadHappenings(ctx context.Context) ([]*models.Happening, error)
- func (hm *HappeningManager) UpdateHappening(ctx context.Context, id int64, update *models.HappeningOptional) (*models.Happening, error)
- type LogManager
- func (m *LogManager) Add(entry models.LogEntry) (int64, error)
- func (m *LogManager) AddNote(entryID int64, note models.Note) error
- func (m *LogManager) Delete(id int64) error
- func (m *LogManager) DeleteNote(entryID int64, noteID int64) error
- func (m *LogManager) Get(id int64) (*models.LogEntryView, error)
- func (m *LogManager) GetTree(ctx context.Context, id int64, includeHistory bool) (*models.LogEntryView, error)
- func (m *LogManager) Init() error
- func (m *LogManager) InitWithHistory(showHistory bool) error
- func (m *LogManager) Move(id int64, newParentID int64) error
- func (m *LogManager) ToggleCollapsed(id int64) error
- func (m *LogManager) Update(id int64, entry models.LogEntryOptional) error
- func (m *LogManager) UpdateNote(entryID int64, noteID int64, note models.NoteOptional) error
- type Services
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func SaveConfig ¶
Types ¶
type HappeningManager ¶ added in v0.0.15
type HappeningManager struct {
// contains filtered or unexported fields
}
HappeningManager manages happenings with internal caching
func NewHappeningManager ¶ added in v0.0.15
func NewHappeningManager(service storage.HappeningService) *HappeningManager
NewHappeningManager creates a new HappeningManager with the given service
func (*HappeningManager) AddHappening ¶ added in v0.0.15
func (hm *HappeningManager) AddHappening(ctx context.Context, content string) (*models.Happening, error)
AddHappening adds a new happening and updates the cache internally
func (*HappeningManager) DeleteHappening ¶ added in v0.0.15
func (hm *HappeningManager) DeleteHappening(ctx context.Context, id int64) error
DeleteHappening deletes a happening and updates the cache internally
func (*HappeningManager) InvalidateCache ¶ added in v0.0.15
func (hm *HappeningManager) InvalidateCache()
InvalidateCache clears the cache, forcing next load to be fresh
func (*HappeningManager) LoadHappenings ¶ added in v0.0.15
LoadHappenings returns cached happenings immediately after first load, with async refresh
func (*HappeningManager) UpdateHappening ¶ added in v0.0.15
func (hm *HappeningManager) UpdateHappening(ctx context.Context, id int64, update *models.HappeningOptional) (*models.Happening, error)
UpdateHappening updates a happening and updates the cache internally
type LogManager ¶
type LogManager struct {
LogEntryService storage.LogEntryService
LogNoteService storage.LogNoteService
HappeningService storage.HappeningService
StateRecordingService storage.StateRecordingService
Entries []*models.LogEntryView
// Happening manager with internal caching
HappeningManager *HappeningManager
}
func NewLogManager ¶
func NewLogManager(services *Services) *LogManager
func (*LogManager) Delete ¶
func (m *LogManager) Delete(id int64) error
func (*LogManager) DeleteNote ¶
func (m *LogManager) DeleteNote(entryID int64, noteID int64) error
func (*LogManager) Get ¶ added in v0.0.12
func (m *LogManager) Get(id int64) (*models.LogEntryView, error)
func (*LogManager) GetTree ¶ added in v0.0.12
func (m *LogManager) GetTree(ctx context.Context, id int64, includeHistory bool) (*models.LogEntryView, error)
GetTree loads all descendants of a given root ID, with optional history entries Returns a single LogEntryView containing all children
func (*LogManager) Init ¶
func (m *LogManager) Init() error
Init initializes with default behavior (no history)
func (*LogManager) InitWithHistory ¶ added in v0.0.4
func (m *LogManager) InitWithHistory(showHistory bool) error
func (*LogManager) Move ¶ added in v0.0.9
func (m *LogManager) Move(id int64, newParentID int64) error
func (*LogManager) ToggleCollapsed ¶ added in v0.0.15
func (m *LogManager) ToggleCollapsed(id int64) error
ToggleCollapsed toggles the collapsed state of an entry
func (*LogManager) Update ¶
func (m *LogManager) Update(id int64, entry models.LogEntryOptional) error
func (*LogManager) UpdateNote ¶
func (m *LogManager) UpdateNote(entryID int64, noteID int64, note models.NoteOptional) error
type Services ¶ added in v0.0.25
type Services struct {
LogEntry storage.LogEntryService
LogNote storage.LogNoteService
Happening storage.HappeningService
StateRecording storage.StateRecordingService
LearningMaterials *http.LearningMaterialsHttpService
}
Services wraps all storage services