Documentation
¶
Index ¶
- Variables
- func AuthenticateLDAPUser(username, password string) (*users.User, error)
- func BuildAndStreamArchive(w http.ResponseWriter, r *http.Request, d *requestContext, source string, ...) (int, error)
- func GetEmbeddedAssets() embed.FS
- func LoggingMiddleware(next http.Handler) http.Handler
- func StartHttp(ctx context.Context, storage *bolt.BoltStore, shutdownComplete chan struct{})
- type AuthTokenFrontend
- type BulkDeleteItem
- type BulkDeleteResponse
- type DirectDownloadResponse
- type FileCache
- type GroupListResponse
- type HttpResponse
- type MoveCopyItem
- type MoveCopyRequest
- type MoveCopyResponse
- type OnlyOfficeAction
- type OnlyOfficeCallback
- type OnlyOfficeHistory
- type OnlyOfficeJWTPayload
- type OnlyOfficeLogContext
- type OnlyOfficeLogEvent
- type ResponseWriterWrapper
- type ShareResponse
- type TemplateRenderer
- type UserRequest
Constants ¶
This section is empty.
Variables ¶
var FileInfoFasterFunc = files.FileInfoFaster
Functions ¶
func AuthenticateLDAPUser ¶
AuthenticateLDAPUser attempts LDAP authentication and returns the filebrowser user if successful.
func BuildAndStreamArchive ¶
func BuildAndStreamArchive(w http.ResponseWriter, r *http.Request, d *requestContext, source string, fileList []string) (int, error)
BuildAndStreamArchive resolves paths, creates a zip or tar.gz archive, and streams it to w. It respects access rules and max archive size. Used only by the raw handler for multi-file/directory download.
func GetEmbeddedAssets ¶
GetEmbeddedAssets returns the embedded assets filesystem
func LoggingMiddleware ¶
LoggingMiddleware logs each request and its status code.
Types ¶
type AuthTokenFrontend ¶
type BulkDeleteItem ¶
type BulkDeleteItem struct {
Source string `json:"source"`
Path string `json:"path"`
Message string `json:"message,omitempty"`
}
BulkDeleteItem represents a single item in a bulk delete request
type BulkDeleteResponse ¶
type BulkDeleteResponse struct {
Succeeded []BulkDeleteItem `json:"succeeded"`
Failed []BulkDeleteItem `json:"failed"`
}
BulkDeleteResponse represents the response from a bulk delete operation
type DirectDownloadResponse ¶
type DirectDownloadResponse struct {
Status string `json:"status"`
Hash string `json:"hash"`
DownloadURL string `json:"url"`
}
DirectDownloadResponse represents the response for direct download endpoint
type GroupListResponse ¶
type GroupListResponse struct {
Groups []string `json:"groups"`
}
type HttpResponse ¶
type MoveCopyItem ¶
type MoveCopyItem struct {
FromSource string `json:"fromSource,omitempty"`
FromPath string `json:"fromPath,omitempty"`
ToSource string `json:"toSource,omitempty"`
ToPath string `json:"toPath,omitempty"`
Message string `json:"message,omitempty"`
}
MoveCopyItem represents a single item in a move/copy request
type MoveCopyRequest ¶
type MoveCopyRequest struct {
Items []MoveCopyItem `json:"items"`
Action string `json:"action"` // "copy", "move", or "rename"
Overwrite bool `json:"overwrite"` // Overwrite if destination exists
Rename bool `json:"rename"` // Auto-rename if destination exists
}
MoveCopyRequest represents a move/copy operation request
type MoveCopyResponse ¶
type MoveCopyResponse struct {
Succeeded []MoveCopyItem `json:"succeeded"`
Failed []MoveCopyItem `json:"failed"`
}
MoveCopyResponse represents the response from a move/copy operation
type OnlyOfficeAction ¶
type OnlyOfficeCallback ¶
type OnlyOfficeCallback struct {
Actions []OnlyOfficeAction `json:"actions,omitempty"`
ChangesURL string `json:"changesurl,omitempty"`
FileType string `json:"filetype,omitempty"`
ForceSaveType int `json:"forcesavetype,omitempty"`
FormsDataURL string `json:"formsdataurl,omitempty"`
History *OnlyOfficeHistory `json:"history,omitempty"`
Key string `json:"key,omitempty"`
Status int `json:"status,omitempty"`
URL string `json:"url,omitempty"`
UserData string `json:"userdata,omitempty"`
Users []string `json:"users,omitempty"`
}
type OnlyOfficeHistory ¶
type OnlyOfficeHistory struct {
Changes interface{} `json:"changes"`
ServerVersion string `json:"serverVersion"`
}
type OnlyOfficeJWTPayload ¶
type OnlyOfficeJWTPayload struct {
Key string `json:"key"`
Status int `json:"status"`
Users []string `json:"users"`
Actions []struct {
Type int `json:"type"`
UserID string `json:"userid"`
} `json:"actions"`
}
OnlyOfficeJWTPayload represents the JWT payload structure for OnlyOffice callbacks
type OnlyOfficeLogContext ¶
type OnlyOfficeLogContext struct {
Username string
SessionID string
DocumentID string
FilePath string
Source string
StartTime time.Time
// contains filtered or unexported fields
}
OnlyOfficeLogContext stores context for OnlyOffice operations
type OnlyOfficeLogEvent ¶
type OnlyOfficeLogEvent struct {
EventType string `json:"eventType"`
DocumentID string `json:"documentId"`
Username string `json:"username"`
SessionID string `json:"sessionId"`
LogLevel string `json:"logLevel"`
Message string `json:"message"`
Timestamp string `json:"timestamp"`
Component string `json:"component"`
}
OnlyOfficeLogEvent represents a log event for SSE
type ResponseWriterWrapper ¶
type ResponseWriterWrapper struct {
http.ResponseWriter
StatusCode int
PayloadSize int
User string
// contains filtered or unexported fields
}
ResponseWriterWrapper wraps the standard http.ResponseWriter to capture the status code
func (*ResponseWriterWrapper) Flush ¶
func (w *ResponseWriterWrapper) Flush()
func (*ResponseWriterWrapper) Write ¶
func (w *ResponseWriterWrapper) Write(b []byte) (int, error)
Write is the method to write the response body and ensure WriteHeader is called
func (*ResponseWriterWrapper) WriteHeader ¶
func (w *ResponseWriterWrapper) WriteHeader(statusCode int)
WriteHeader captures the status code and ensures it's only written once
type ShareResponse ¶
type ShareResponse struct {
}
ShareResponse represents a share with computed username field and download URL
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
func (*TemplateRenderer) Render ¶
func (t *TemplateRenderer) Render(w http.ResponseWriter, name string, data interface{}) error
Render renders a template document with headers and data