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