Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutesWithAuth ¶
func RegisterRoutesWithAuth(e *echo.Echo, authMiddleware *auth.Middleware)
RegisterRoutesWithAuth registers filesystem routes with authentication.
Types ¶
type BrowseOptions ¶
type BrowseOptions BrowseQuery
BrowseOptions has the same structure as BrowseQuery to allow direct type conversion.
type BrowseQuery ¶
type BrowseQuery struct {
Path string `query:"path" json:"path,omitempty" default:"/"`
ShowHidden bool `query:"show_hidden" json:"show_hidden,omitempty"`
Limit int `query:"limit" json:"limit,omitempty" default:"50" validate:"min=1,max=100"`
Offset int `query:"offset" json:"offset,omitempty" validate:"min=0"`
Search string `query:"search" json:"search,omitempty"`
}
BrowseQuery contains query parameters for the browse endpoint.
type BrowseResponse ¶
type BrowseResponse struct {
CurrentPath string `json:"current_path"`
ParentPath string `json:"parent_path,omitempty"`
Entries []Entry `json:"entries"`
Total int `json:"total"`
HasMore bool `json:"has_more"`
}
BrowseResponse contains the response for the browse endpoint.
type Entry ¶
type Entry struct {
Name string `json:"name"`
Path string `json:"path"`
IsDir bool `json:"is_dir"`
}
Entry represents a filesystem entry (file or directory).
type Service ¶
type Service struct{}
func NewService ¶
func NewService() *Service
func (*Service) Browse ¶
func (s *Service) Browse(opts BrowseOptions) (*BrowseResponse, error)
Click to show internal directories.
Click to hide internal directories.