journal

package
v0.0.0-...-dd4be11 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package journal provides functionalities to manage and retrieve file action histories and lifetimes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActionsPage

func GetActionsPage(ctx context.Context, pageSize, pageNum int) ([]history.FileAction, error)

GetActionsPage retrieves a paginated list of file actions.

func GetAllActionsByTowerID

func GetAllActionsByTowerID(ctx context.Context, towerID string) ([]*history.FileAction, error)

GetAllActionsByTowerID retrieves all file actions associated with a specific tower, sorted by timestamp in descending order (most recent first).

func GetLatestPathByID

func GetLatestPathByID(ctx context.Context, fileID string) (wlfs.Filepath, error)

GetLatestPathByID retrieves the most recent path where a file with the given ID was located. Returns the destination path if available, otherwise falls back to the filepath field.

func GetPastFileByID

func GetPastFileByID(ctx context.Context, fileID string, timestamp time.Time) (*file_model.WeblensFileImpl, error)

GetPastFileByID retrieves the historical state of a file by its ID at a specific point in time. Unlike GetPastFileByPath, this uses the known file ID directly instead of looking it up by path, which avoids ambiguity when multiple files have existed at the same path over time.

func GetPastFileByPath

func GetPastFileByPath(ctx context.Context, path wlfs.Filepath, time time.Time) (*file_model.WeblensFileImpl, error)

GetPastFileByPath retrieves the historical state of a file at a given path and point in time. It reconstructs the file's state including its children and parent relationships as they existed at that time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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