api

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheStatus

type CacheStatus struct {
	CacheType    string `json:"cache_type"`
	TotalEntries int    `json:"total_entries"`
	StaleEntries int    `json:"stale_entries"`
	LastUpdate   int64  `json:"last_update"`
	Status       string `json:"status"` // "REBUILD", "UPDATE", "FRESH"
}

type DirectoryEntry

type DirectoryEntry struct {
	Name      string `json:"name"`
	Path      string `json:"path"`
	IsDir     bool   `json:"is_dir"`
	Size      int64  `json:"size"`
	Modified  int64  `json:"modified"`
	FileCount int    `json:"file_count,omitempty"`
	DirCount  int    `json:"dir_count,omitempty"`
}

type DirectoryStats

type DirectoryStats struct {
	Path           string `json:"path"`
	ParentPath     string `json:"parent_path,omitempty"`
	Depth          int    `json:"depth"`
	FileCount      int    `json:"file_count"`
	DirectoryCount int    `json:"dir_count"`
	TotalSize      int64  `json:"total_size"`
	LastModified   int64  `json:"last_modified"`
}

type ExtensionStats

type ExtensionStats struct {
	Extension    string  `json:"extension"`
	FileCount    int     `json:"file_count"`
	TotalSize    int64   `json:"total_size"`
	AverageSize  float64 `json:"average_size"`
	MinSize      int64   `json:"min_size"`
	MaxSize      int64   `json:"max_size"`
	LastModified int64   `json:"last_modified"`
}

Extension statistics response types

type FileMetadata

type FileMetadata struct {
	Name          string  `json:"name"`
	Path          string  `json:"path"`
	Size          int64   `json:"size"`
	Created       int64   `json:"created"`
	Modified      int64   `json:"modified"`
	Accessed      int64   `json:"accessed"`
	IsDir         bool    `json:"is_dir"`
	IsSymlink     bool    `json:"is_symlink"`
	IsHidden      bool    `json:"is_hidden"`
	FileMode      string  `json:"file_mode"`
	FileExtension string  `json:"file_extension"`
	SHA256        *string `json:"sha256,omitempty"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(db *sql.DB) *Handler

func (*Handler) AdvancedSearch

func (h *Handler) AdvancedSearch(c echo.Context) error

AdvancedSearch performs advanced file search with multiple criteria

func (*Handler) CompareDumps

func (h *Handler) CompareDumps(c echo.Context) error

CompareDumps compares two dumps and returns changes

func (*Handler) GetCacheStatus

func (h *Handler) GetCacheStatus(c echo.Context) error

GetCacheStatus returns the current status of caches

func (*Handler) GetDirectoryTree

func (h *Handler) GetDirectoryTree(c echo.Context) error

GetDirectoryTree returns the directory tree structure with statistics

func (*Handler) GetExtensionStats

func (h *Handler) GetExtensionStats(c echo.Context) error

GetExtensionStats returns statistics about file extensions

func (*Handler) GetFileMetadata

func (h *Handler) GetFileMetadata(c echo.Context) error

GetFileMetadata returns detailed metadata for a specific file

func (*Handler) GetStats

func (h *Handler) GetStats(c echo.Context) error

GetStats returns statistics about the filesystem

func (*Handler) ListDirectory

func (h *Handler) ListDirectory(c echo.Context) error

ListDirectory returns the contents of a directory

func (*Handler) SearchFiles

func (h *Handler) SearchFiles(c echo.Context) error

SearchFiles searches for files matching the given pattern

type PaginatedResponse added in v1.2.1

type PaginatedResponse struct {
	Data       interface{} `json:"data"`
	Page       int         `json:"page"`
	PerPage    int         `json:"per_page"`
	Total      int         `json:"total"`
	TotalPages int         `json:"total_pages"`
	HasNext    bool        `json:"has_next"`
}

PaginatedResponse represents a paginated response

func NewPaginatedResponse added in v1.2.1

func NewPaginatedResponse(c echo.Context, data interface{}, page int, perPage int, total int) *PaginatedResponse

NewPaginatedResponse creates a new paginated response and adds telemetry

type StorageComparison

type StorageComparison struct {
	Path        string `json:"path"`
	OldSize     int64  `json:"old_size"`
	NewSize     int64  `json:"new_size"`
	SizeDiff    int64  `json:"size_diff"`
	OldModified int64  `json:"old_modified"`
	NewModified int64  `json:"new_modified"`
	Status      string `json:"status"` // "added", "deleted", "modified", "unchanged"
}

Jump to

Keyboard shortcuts

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