Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
func RegisterRoutes(e *echo.Echo, h *Handler, authMiddleware *auth.Middleware)
RegisterRoutes registers cache management routes on the given echo instance. GET /cache requires config:read; POST /cache/:id/clear requires config:write.
Types ¶
type ClearResponse ¶
type ClearResponse struct {
ClearedBytes int64 `json:"cleared_bytes"`
ClearedFiles int `json:"cleared_files"`
}
ClearResponse is returned from POST /cache/:id/clear.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler exposes HTTP endpoints for cache management.
func NewHandler ¶
NewHandler returns a new cache management handler.
type Info ¶
type Info struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
SizeBytes int64 `json:"size_bytes"`
FileCount int `json:"file_count"`
}
Info describes a single cache in the list response. The type name avoids stuttering (cache.Info instead of cache.CacheInfo).
type ListResponse ¶
type ListResponse struct {
Caches []Info `json:"caches"`
}
ListResponse is returned from GET /cache.
Click to show internal directories.
Click to hide internal directories.