gitea源码

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2023 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package internal
  4. import "code.gitea.io/gitea/modules/timeutil"
  5. type FileUpdate struct {
  6. Filename string
  7. BlobSha string
  8. Size int64
  9. Sized bool
  10. }
  11. // RepoChanges changes (file additions/updates/removals) to a repo
  12. type RepoChanges struct {
  13. Updates []FileUpdate
  14. RemovedFilenames []string
  15. }
  16. // IndexerData represents data stored in the code indexer
  17. type IndexerData struct {
  18. RepoID int64
  19. }
  20. // SearchResult result of performing a search in a repo
  21. type SearchResult struct {
  22. RepoID int64
  23. StartIndex int
  24. EndIndex int
  25. Filename string
  26. Content string
  27. CommitID string
  28. UpdatedUnix timeutil.TimeStamp
  29. Language string
  30. Color string
  31. }
  32. // SearchResultLanguages result of top languages count in search results
  33. type SearchResultLanguages struct {
  34. Language string
  35. Color string
  36. Count int
  37. }