This repository has been archived on 2026-07-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
codespace/internal/model/file.go
T
2026-07-02 15:07:54 +08:00

25 lines
615 B
Go

package model
// WriteFileRequest is the request body for writing a file.
type WriteFileRequest struct {
Path string `json:"path"`
Content string `json:"content"`
}
// MkdirRequest is the request body for creating a directory.
type MkdirRequest struct {
Path string `json:"path"`
}
// RenameRequest is the request body for renaming a file or directory.
type RenameRequest struct {
OldPath string `json:"oldPath"`
NewPath string `json:"newPath"`
}
// ReadFileResponse is the API response for reading a file.
type ReadFileResponse struct {
Path string `json:"path"`
Content string `json:"content"`
}