vfsapi

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package vfsapi provides HTTP handlers for file and folder management.

Index

Constants

View Source
const (
	MaxRequestSize = vfsservice.MaxUploadSize + 10*1024
)

Variables

This section is empty.

Functions

func AddRoutes

func AddRoutes(mux *http.ServeMux, fileService vfsservice.Service)

AddRoutes sets up the routes for file and folder operations.

Types

type FileResponse

type FileResponse struct {
	ID          string    `json:"id" example:"file_abc123"`
	Path        string    `json:"path" example:"/documents/report.pdf"`
	Name        string    `json:"name" example:"report.pdf"`
	ContentType string    `json:"contentType,omitempty" example:"application/pdf"`
	Size        int64     `json:"size" example:"102400"`
	CreatedAt   time.Time `json:"createdAt" example:"2024-06-01T12:00:00Z"`
	UpdatedAt   time.Time `json:"updatedAt" example:"2024-06-01T12:00:00Z"`
}

FileResponse represents a file in API responses.

type FolderResponse

type FolderResponse struct {
	ID        string    `json:"id" example:"folder_xyz789"`
	Path      string    `json:"path" example:"/documents/projects"`
	Name      string    `json:"name" example:"projects"`
	ParentID  string    `json:"parentId,omitempty" example:"folder_root"`
	CreatedAt time.Time `json:"createdAt" example:"2024-06-01T12:00:00Z"`
	UpdatedAt time.Time `json:"updatedAt" example:"2024-06-01T12:00:00Z"`
}

FolderResponse represents a folder in API responses.

Jump to

Keyboard shortcuts

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