mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-14 12:04:22 -04:00
Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418)
This commit is contained in:
@@ -5,20 +5,32 @@ package structs
|
||||
|
||||
// GitEntry represents a git tree
|
||||
type GitEntry struct {
|
||||
// Path is the file or directory path
|
||||
Path string `json:"path"`
|
||||
// Mode is the file mode (permissions)
|
||||
Mode string `json:"mode"`
|
||||
// Type indicates if this is a file, directory, or symlink
|
||||
Type string `json:"type"`
|
||||
Size int64 `json:"size"`
|
||||
SHA string `json:"sha"`
|
||||
URL string `json:"url"`
|
||||
// Size is the file size in bytes
|
||||
Size int64 `json:"size"`
|
||||
// SHA is the Git object SHA
|
||||
SHA string `json:"sha"`
|
||||
// URL is the API URL for this tree entry
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// GitTreeResponse returns a git tree
|
||||
type GitTreeResponse struct {
|
||||
SHA string `json:"sha"`
|
||||
URL string `json:"url"`
|
||||
Entries []GitEntry `json:"tree"`
|
||||
Truncated bool `json:"truncated"`
|
||||
Page int `json:"page"`
|
||||
TotalCount int `json:"total_count"`
|
||||
// SHA is the tree object SHA
|
||||
SHA string `json:"sha"`
|
||||
// URL is the API URL for this tree
|
||||
URL string `json:"url"`
|
||||
// Entries contains the tree entries (files and directories)
|
||||
Entries []GitEntry `json:"tree"`
|
||||
// Truncated indicates if the response was truncated due to size
|
||||
Truncated bool `json:"truncated"`
|
||||
// Page is the current page number for pagination
|
||||
Page int `json:"page"`
|
||||
// TotalCount is the total number of entries in the tree
|
||||
TotalCount int `json:"total_count"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user