2018-11-28 14:17:09 -07:00
|
|
|
// Copyright 2018 The Gitea Authors. All rights reserved.
|
2022-11-27 11:20:29 -07:00
|
|
|
// SPDX-License-Identifier: MIT
|
2018-11-28 14:17:09 -07:00
|
|
|
|
2019-05-11 04:21:34 -06:00
|
|
|
package structs
|
2018-11-28 14:17:09 -07:00
|
|
|
|
|
|
|
// GitEntry represents a git tree
|
|
|
|
type GitEntry struct {
|
|
|
|
Path string `json:"path"`
|
|
|
|
Mode string `json:"mode"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Size int64 `json:"size"`
|
|
|
|
SHA string `json:"sha"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// GitTreeResponse returns a git tree
|
|
|
|
type GitTreeResponse struct {
|
2019-02-06 11:19:26 -07:00
|
|
|
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"`
|
2018-11-28 14:17:09 -07:00
|
|
|
}
|