Documentation
¶
Overview ¶
Package scipgraph parses SCIP indexes into storage rows.
Index ¶
- Variables
- func VersionlessSymbolKey(symbol string) ([]byte, error)
- type DependencyReader
- type Location
- type Occurrence
- type OccurrencePosition
- type Package
- type PackageMapping
- type Relationship
- type Service
- func (service *Service) Navigate(ctx context.Context, principal authn.Principal, ...) (api.SCIPNavigationResponse, error)
- func (service *Service) RefreshGitHubDependencies(ctx context.Context, principal authn.Principal, repositoryID int64) (api.DependencyRefreshResponse, error)
- func (service *Service) SetDependencies(ctx context.Context, principal authn.Principal, repositoryID int64, ...) error
- func (service *Service) Upload(ctx context.Context, principal authn.Principal, repositoryID int64, ...) error
- func (service *Service) ValidateUpload(ctx context.Context, principal authn.Principal, repositoryID int64, ...) error
- type ServiceStore
- type StoredOccurrence
- type Upload
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrForbidden = errors.New("forbidden") ErrInvalidRequest = errors.New("invalid_request") ErrNotIndexed = errors.New("not_indexed") // Navigate used to collapse all four conditions below into ErrNotIndexed, which // reported a healthy, search-indexed repository as unindexed. They are distinct // causes with distinct operator remedies, so they get distinct sentinels. ErrStaleCommit = errors.New("stale_commit") ErrSCIPStale = errors.New("scip_stale") ErrSymbolNotFound = errors.New("symbol_not_found") )
View Source
var ( ErrOccurrenceNotFound = errors.New("SCIP occurrence not found") ErrStaleIndex = errors.New("stale SCIP index") )
View Source
var ErrInvalidIndex = errors.New("invalid SCIP index")
Functions ¶
func VersionlessSymbolKey ¶
Types ¶
type DependencyReader ¶
type Occurrence ¶
type OccurrencePosition ¶
type OccurrencePosition struct {
UTF8, UTF16, UTF32 int
}
type PackageMapping ¶
type Relationship ¶
type Service ¶
type Service struct {
Store ServiceStore
GitHub DependencyReader
MaxResults int
}
func (*Service) Navigate ¶
func (service *Service) Navigate(ctx context.Context, principal authn.Principal, request api.SCIPNavigationRequest) (api.SCIPNavigationResponse, error)
func (*Service) RefreshGitHubDependencies ¶
func (*Service) SetDependencies ¶
type ServiceStore ¶
type ServiceStore interface {
AuthorizedRepository(context.Context, int64, []int64, int64) (repository.Repository, error)
AnyAuthorizedRepository(context.Context, int64) (repository.Repository, error)
ReplaceSCIP(context.Context, int64, string, Upload) error
OccurrenceAt(context.Context, int64, string, string, int, OccurrencePosition) (StoredOccurrence, error)
// SCIPIndexCommit reports the commit of the most recent SCIP upload for a
// repository, or "" when none exists. Consulted only on the error path.
SCIPIndexCommit(context.Context, int64) (string, error)
Locations(context.Context, authn.Principal, StoredOccurrence, string, int) ([]Location, bool, error)
ReplacePackages(context.Context, int64, string, []PackageMapping) error
}
type StoredOccurrence ¶
type Upload ¶
type Upload struct {
ProjectRoot, IndexerName, IndexerVersion string
Occurrences []Occurrence
Relationships []Relationship
}
Click to show internal directories.
Click to hide internal directories.