Documentation
¶
Overview ¶
Package files implements the tailkitd files integration:
POST /files — receive a file written atomically to the node GET /files?path= — read a single file (JSON wrapper or raw bytes) GET /files?dir= — list a directory
Both reads and writes are gated by files.toml configuration. Path traversal is checked on every operation before any filesystem I/O.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirEntry ¶
type DirEntry struct {
Name string `json:"name"`
Size int64 `json:"size"`
IsDir bool `json:"is_dir"`
ModTime time.Time `json:"mod_time"`
Mode string `json:"mode"`
}
DirEntry is one entry in a directory listing response.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves GET and POST /files.
func NewHandler ¶
func NewHandler(cfg config.FilesConfig, reg *exec.Registry, runner *exec.Runner, jobs *exec.JobStore, logger *zap.Logger) *Handler
NewHandler constructs a files Handler. If cfg.Enabled is false the handler responds 503 to all requests.
Click to show internal directories.
Click to hide internal directories.