Documentation
¶
Index ¶
- Variables
- func LoggingMiddleware(next http.Handler) http.Handler
- func StartHttp(ctx context.Context, storage *bolt.BoltStore, shutdownComplete chan struct{})
- type AuthTokenMin
- type DirectDownloadResponse
- type FileCache
- type GroupListResponse
- type HttpResponse
- type OnlyOfficeCallback
- type OnlyOfficeJWTPayload
- type ResponseWriterWrapper
- type ShareResponse
- type TemplateRenderer
- type UserRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var FileInfoFasterFunc = files.FileInfoFaster
Functions ¶
func LoggingMiddleware ¶
LoggingMiddleware logs each request and its status code.
Types ¶
type AuthTokenMin ¶
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 OnlyOfficeCallback ¶
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 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
type UserRequest ¶
Click to show internal directories.
Click to hide internal directories.