code.gitea.io/gitea@v1.19.3/modules/structs/repo_tree.go (about)

     1  // Copyright 2018 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package structs
     5  
     6  // GitEntry represents a git tree
     7  type GitEntry struct {
     8  	Path string `json:"path"`
     9  	Mode string `json:"mode"`
    10  	Type string `json:"type"`
    11  	Size int64  `json:"size"`
    12  	SHA  string `json:"sha"`
    13  	URL  string `json:"url"`
    14  }
    15  
    16  // GitTreeResponse returns a git tree
    17  type GitTreeResponse struct {
    18  	SHA        string     `json:"sha"`
    19  	URL        string     `json:"url"`
    20  	Entries    []GitEntry `json:"tree"`
    21  	Truncated  bool       `json:"truncated"`
    22  	Page       int        `json:"page"`
    23  	TotalCount int        `json:"total_count"`
    24  }