Documentation
¶
Overview ¶
Package journal provides functionalities to manage and retrieve file action histories and lifetimes.
Index ¶
- func GetActionsPage(ctx context.Context, pageSize, pageNum int) ([]history.FileAction, error)
- func GetAllActionsByTowerID(ctx context.Context, towerID string) ([]*history.FileAction, error)
- func GetLatestPathByID(ctx context.Context, fileID string) (wlfs.Filepath, error)
- func GetPastFileByID(ctx context.Context, fileID string, timestamp time.Time) (*file_model.WeblensFileImpl, error)
- func GetPastFileByPath(ctx context.Context, path wlfs.Filepath, time time.Time) (*file_model.WeblensFileImpl, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActionsPage ¶
GetActionsPage retrieves a paginated list of file actions.
func GetAllActionsByTowerID ¶
GetAllActionsByTowerID retrieves all file actions associated with a specific tower, sorted by timestamp in descending order (most recent first).
func GetLatestPathByID ¶
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.