Documentation
¶
Index ¶
- Constants
- type DependencyRefreshResponse
- type GraphBoundary
- type GraphCandidate
- type GraphContextRequest
- type GraphContextResponse
- type GraphImpactRequest
- type GraphImpactResponse
- type GraphJobState
- type GraphPosition
- type GraphReference
- type GraphRepositorySelector
- type GraphSource
- type GraphState
- type GraphStatus
- type GraphSymbol
- type GraphSymbolSelector
- type GraphTraceRequest
- type GraphTraceResponse
- type ReadFileRequest
- type ReadFileResponse
- type Repository
- type RepositoryPackages
- type RepositorySummary
- type SCIPFallbackStatus
- type SCIPLocation
- type SCIPNavigationRequest
- type SCIPNavigationResponse
- type SearchConsistency
- type SearchMatch
- type SearchRequest
- type SearchResponse
Constants ¶
View Source
const ( SCIPStatusCurrent = "current" SCIPStatusStale = "stale" SCIPStatusAbsent = "absent" SCIPStatusUnknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GraphBoundary ¶
type GraphCandidate ¶
type GraphContextRequest ¶
type GraphContextRequest struct {
Repo GraphRepositorySelector `json:"repo,omitzero"`
GraphSymbolSelector
Branch string `json:"branch,omitempty"`
Relations []string `json:"relations,omitempty"`
PerCategoryLimit int `json:"per_category_limit,omitempty"`
PerCategoryOffset int `json:"per_category_offset,omitempty"`
IncludeContent bool `json:"include_content,omitempty"`
}
type GraphContextResponse ¶
type GraphContextResponse struct {
Status string `json:"status"`
Symbol *GraphSymbol `json:"symbol,omitempty"`
Candidates []GraphCandidate `json:"candidates,omitempty"`
Incoming map[string][]GraphReference `json:"incoming,omitempty"`
Outgoing map[string][]GraphReference `json:"outgoing,omitempty"`
Boundaries []GraphBoundary `json:"boundaries,omitempty"`
Commits map[string]string `json:"commits"`
}
type GraphImpactRequest ¶
type GraphImpactRequest struct {
Repo GraphRepositorySelector `json:"repo,omitzero"`
Branch string `json:"branch,omitempty"`
TargetUID string `json:"target_uid"`
Direction string `json:"direction"`
Relations []string `json:"relations,omitempty"`
MinConfidence float64 `json:"min_confidence,omitempty"`
IncludeTests bool `json:"include_tests,omitempty"`
MaxDepth int `json:"max_depth,omitempty"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
SummaryOnly bool `json:"summary_only,omitempty"`
}
type GraphImpactResponse ¶
type GraphImpactResponse struct {
Status string `json:"status"`
Candidates []GraphCandidate `json:"candidates,omitempty"`
ByDepth map[int][]GraphSymbol `json:"by_depth"`
Relations []GraphReference `json:"relations,omitempty"`
Boundaries []GraphBoundary `json:"boundaries,omitempty"`
Commits map[string]string `json:"commits"`
Partial bool `json:"partial"`
}
type GraphJobState ¶
type GraphJobState string
const ( GraphJobStateQueued GraphJobState = "queued" GraphJobStateRunning GraphJobState = "running" GraphJobStateSucceeded GraphJobState = "succeeded" GraphJobStateFailed GraphJobState = "failed" GraphJobStateSuperseded GraphJobState = "superseded" )
type GraphPosition ¶
type GraphReference ¶
type GraphReference struct {
SourceRepositoryID int64 `json:"source_repository_id"`
TargetRepositoryID int64 `json:"target_repository_id"`
SourceUID string `json:"source_uid"`
TargetUID string `json:"target_uid"`
Kind string `json:"kind"`
Path string `json:"path,omitempty"`
Range GraphPosition `json:"range"`
Confidence float64 `json:"confidence"`
ResolutionReason string `json:"resolution_reason,omitempty"`
}
type GraphRepositorySelector ¶
func (GraphRepositorySelector) IsZero ¶
func (selector GraphRepositorySelector) IsZero() bool
func (GraphRepositorySelector) MarshalJSON ¶
func (selector GraphRepositorySelector) MarshalJSON() ([]byte, error)
func (*GraphRepositorySelector) UnmarshalJSON ¶
func (selector *GraphRepositorySelector) UnmarshalJSON(data []byte) error
type GraphSource ¶
type GraphSource string
const ( GraphSourceManaged GraphSource = "managed" GraphSourceExternal GraphSource = "external" )
type GraphState ¶
type GraphState string
const ( GraphStateNotIndexed GraphState = "not_indexed" GraphStatePending GraphState = "pending" GraphStateFallback GraphState = "fallback" GraphStateDegraded GraphState = "degraded" GraphStateReady GraphState = "ready" )
type GraphStatus ¶
type GraphStatus struct {
RepositoryID int64 `json:"repository_id"`
Commit string `json:"commit,omitempty"`
State GraphState `json:"state"`
Source GraphSource `json:"source,omitempty"`
JobState GraphJobState `json:"job_state,omitempty"`
ErrorCode string `json:"error_code,omitempty"`
SCIPFallback *SCIPFallbackStatus `json:"scip_fallback,omitempty"`
}
type GraphSymbol ¶
type GraphSymbol struct {
UID string `json:"uid"`
Name string `json:"name"`
Kind string `json:"kind"`
FilePath string `json:"file_path"`
Language string `json:"language"`
Signature string `json:"signature,omitempty"`
RepositoryID int64 `json:"repository_id"`
Range GraphPosition `json:"range"`
Test bool `json:"test"`
Content string `json:"content,omitempty"`
}
type GraphSymbolSelector ¶
type GraphTraceRequest ¶
type GraphTraceRequest struct {
Repo GraphRepositorySelector `json:"repo,omitzero"`
Branch string `json:"branch,omitempty"`
SourceUID string `json:"source_uid"`
TargetUID string `json:"target_uid"`
MaxDepth int `json:"max_depth,omitempty"`
}
type GraphTraceResponse ¶
type GraphTraceResponse struct {
Status string `json:"status"`
Candidates []GraphCandidate `json:"candidates,omitempty"`
Nodes []GraphSymbol `json:"nodes,omitempty"`
Relations []GraphReference `json:"relations,omitempty"`
Boundaries []GraphBoundary `json:"boundaries,omitempty"`
Commits map[string]string `json:"commits"`
}
type ReadFileRequest ¶
type ReadFileResponse ¶
type ReadFileResponse struct {
RepositoryID int64 `json:"repository_id"`
Path string `json:"path"`
IndexedSHA string `json:"indexed_sha"`
BlobSHA string `json:"blob_sha"`
Content string `json:"content"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Truncated bool `json:"truncated"`
}
type Repository ¶
type RepositoryPackages ¶
type RepositorySummary ¶
type RepositorySummary struct {
ID int64 `json:"id"`
GitHubID int64 `json:"github_id"`
Name string `json:"name"`
Branch string `json:"branch"`
DesiredSHA string `json:"desired_sha"`
IndexedSHA string `json:"indexed_sha"`
WebURL string `json:"web_url"`
Status string `json:"status"`
ErrorCode string `json:"error_code"`
SearchNode string `json:"search_node"`
LastIndexedAt *time.Time `json:"last_indexed_at,omitempty"`
// SCIPStatus reports whether code navigation is usable: "current", "stale",
// "absent", or "unknown". Search being healthy says nothing about SCIP, so
// callers need this to tell why navigation tools fail on an indexed repository.
SCIPStatus string `json:"scip_status"`
SCIPCommit string `json:"scip_commit,omitempty"`
}
type SCIPFallbackStatus ¶
type SCIPFallbackStatus struct {
Commit string `json:"commit"`
}
type SCIPLocation ¶
type SCIPLocation struct {
RepositoryID int64 `json:"repository_id"`
RepositoryName string `json:"repository_name"`
Branch string `json:"branch"`
WebURL string `json:"web_url"`
Commit string `json:"commit"`
Path string `json:"path"`
Symbol string `json:"symbol"`
StartLine int `json:"start_line"`
StartCharacter int `json:"start_character"`
EndLine int `json:"end_line"`
EndCharacter int `json:"end_character"`
PositionEncoding string `json:"position_encoding"`
Roles int32 `json:"roles"`
Approximate bool `json:"approximate"`
}
type SCIPNavigationRequest ¶
type SCIPNavigationRequest struct {
}
type SCIPNavigationResponse ¶
type SCIPNavigationResponse struct {
}
type SearchConsistency ¶
type SearchConsistency struct {
Backend string `json:"backend"`
Exact bool `json:"exact"`
Revision string `json:"revision,omitempty"`
Partial bool `json:"partial"`
}
SearchConsistency states what the selected backend can prove about results.
type SearchMatch ¶
type SearchMatch struct {
Repository Repository `json:"repository"`
Path string `json:"path"`
SHA string `json:"sha"`
LineNumber int `json:"line_number"`
LineStart int `json:"line_start"`
LineEnd int `json:"line_end"`
Preview string `json:"preview"`
Score float64 `json:"score"`
ZoektID uint32 `json:"-"`
Branches []string `json:"-"`
}
type SearchRequest ¶
type SearchRequest struct {
Query string `json:"query"`
Repositories []string `json:"repositories,omitempty"`
Limit int `json:"limit,omitempty"`
ContextLines int `json:"context_lines,omitempty"`
Timeout time.Duration `json:"timeout,omitempty"`
MaxResponseBytes int64 `json:"max_response_bytes,omitempty"`
}
type SearchResponse ¶
type SearchResponse struct {
Matches []SearchMatch `json:"matches"`
Truncated bool `json:"truncated"`
Consistency *SearchConsistency `json:"consistency,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.