Documentation ¶
Index ¶
- Constants
- func CreateServer(config *Config) (*http.Server, error)
- func GetFileIcon(filename string, fileType string) string
- func GetFileType(filename string, root string) string
- func GetLocalIP() string
- func PrintAccessInfo(config *Config)
- type APIRequest
- type APIResponse
- type Config
- type DirectoryContent
- type FileInfo
- type HealthStatus
- type SearchCondition
- type SearchQuery
- type SearchResult
- type SearchResultPage
Constants ¶
View Source
const ( ErrInvalidMethod = "INVALID_METHOD" ErrInvalidJSON = "INVALID_JSON" ErrUnknownOperation = "UNKNOWN_OPERATION" ErrMissingPath = "MISSING_PATH" ErrInvalidPath = "INVALID_PATH" ErrFileNotFound = "FILE_NOT_FOUND" ErrOperationFailed = "OPERATION_FAILED" )
View Source
const (
PREFIX_DRIVE string = "/drive/"
)
Variables ¶
This section is empty.
Functions ¶
func CreateServer ¶
CreateServer creates an HTTP server with the specified configuration
func GetFileIcon ¶
func GetFileType ¶
func PrintAccessInfo ¶
func PrintAccessInfo(config *Config)
PrintAccessInfo prints server access information
Types ¶
type APIRequest ¶
type APIResponse ¶
type DirectoryContent ¶
type HealthStatus ¶
type HealthStatus struct { Status string `json:"status"` Uptime string `json:"uptime"` MemoryUse float64 `json:"memory_use"` CPUUse float64 `json:"cpu_use"` DiskUse float64 `json:"disk_use"` NetworkIn uint64 `json:"network_in"` NetworkOut uint64 `json:"network_out"` DiskStatus string `json:"disk_status"` NetworkStatus string `json:"network_status"` StartTime time.Time `json:"start_time"` }
type SearchCondition ¶
type SearchQuery ¶
type SearchQuery struct { Conditions []SearchCondition IsOr bool }
type SearchResult ¶
type SearchResultPage ¶
type SearchResultPage struct { Query string Results []SearchResult }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.