mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
40 lines
714 B
TypeScript
40 lines
714 B
TypeScript
|
|
|
||
|
|
|
||
|
|
export const pathQueryParamName = "path";
|
||
|
|
export const repoQueryParamName = "repo";
|
||
|
|
|
||
|
|
export type GetSourceResponse = {
|
||
|
|
content: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ZoektMatch {
|
||
|
|
URL: string,
|
||
|
|
FileName: string,
|
||
|
|
LineNum: number,
|
||
|
|
Fragments: {
|
||
|
|
Pre: string,
|
||
|
|
Match: string,
|
||
|
|
Post: string
|
||
|
|
}[]
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ZoektFileMatch {
|
||
|
|
FileName: string,
|
||
|
|
Repo: string,
|
||
|
|
Language: string,
|
||
|
|
Matches: ZoektMatch[],
|
||
|
|
URL: string,
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ZoektResult {
|
||
|
|
QueryStr: string,
|
||
|
|
FileMatches: ZoektFileMatch[] | null,
|
||
|
|
Stats: {
|
||
|
|
// Duration in nanoseconds
|
||
|
|
Duration: number,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ZoektSearchResponse {
|
||
|
|
result: ZoektResult,
|
||
|
|
}
|