gitea源码

12345678910111213141516171819202122232425
  1. // Copyright 2018 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. // Reference represents a Git reference.
  5. type Reference struct {
  6. // The name of the Git reference (e.g., refs/heads/main)
  7. Ref string `json:"ref"`
  8. // The URL to access this Git reference
  9. URL string `json:"url"`
  10. // The Git object that this reference points to
  11. Object *GitObject `json:"object"`
  12. }
  13. // GitObject represents a Git object.
  14. type GitObject struct {
  15. // The type of the Git object (e.g., commit, tag, tree, blob)
  16. Type string `json:"type"`
  17. // The SHA hash of the Git object
  18. SHA string `json:"sha"`
  19. // The URL to access this Git object
  20. URL string `json:"url"`
  21. }