mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
chore: Add docs for RepoStore methods (#64283)
This commit is contained in:
parent
e4e1f55026
commit
e1e78988aa
@ -72,13 +72,40 @@ type RepoStore interface {
|
||||
Count(context.Context, ReposListOptions) (int, error)
|
||||
Create(context.Context, ...*types.Repo) error
|
||||
Delete(context.Context, ...api.RepoID) error
|
||||
// Get gets information about a single repo.
|
||||
//
|
||||
// Prefer using GetByIDs or GetReposSetByIDs for bulk retrieval.
|
||||
//
|
||||
// Returns database.RepoNotFoundErr if the repo was not found.
|
||||
// Returns types.BlockedRepoError if the repo was blocked.
|
||||
Get(context.Context, api.RepoID) (*types.Repo, error)
|
||||
// GetByIDs returns a slice containing information about repos present on the instance.
|
||||
//
|
||||
// The slice may have fewer entries than the number of input RepoIDs,
|
||||
// due to repos not being found or having been deleted/blocked etc.
|
||||
//
|
||||
// Even if the number of elements matches, the caller may not assume anything
|
||||
// about ordering. Use the ID field on each types.Repo value instead.
|
||||
GetByIDs(context.Context, ...api.RepoID) ([]*types.Repo, error)
|
||||
// GetByName is analogous to Get but using an api.RepoName.
|
||||
//
|
||||
// Prefer using Get over GetByName for trusted input.
|
||||
//
|
||||
// Returns database.RepoNotFoundErr if the repo was not found.
|
||||
// Returns types.BlockedRepoError if the repo was blocked.
|
||||
GetByName(context.Context, api.RepoName) (*types.Repo, error)
|
||||
GetByHashedName(context.Context, api.RepoHashedName) (*types.Repo, error)
|
||||
GetFirstRepoNameByCloneURL(context.Context, string) (api.RepoName, error)
|
||||
GetFirstRepoByCloneURL(context.Context, string) (*types.Repo, error)
|
||||
// GetReposSetByIDs returns a map containing information about repos present on the instance.
|
||||
//
|
||||
// The map may have fewer key-value pairs than the number of input RepoIDs,
|
||||
// due to repos not being found or having been deleted/blocked etc.
|
||||
GetReposSetByIDs(context.Context, ...api.RepoID) (map[api.RepoID]*types.Repo, error)
|
||||
// GetRepoDescriptionsByIDs returns descriptions about repos present on the instance.
|
||||
//
|
||||
// The map may have fewer key-value pairs than the number of input RepoIDs,
|
||||
// due to repos not being found or having been deleted/blocked etc.
|
||||
GetRepoDescriptionsByIDs(context.Context, ...api.RepoID) (map[api.RepoID]string, error)
|
||||
List(context.Context, ReposListOptions) ([]*types.Repo, error)
|
||||
ListMinimalRepos(context.Context, ReposListOptions) ([]types.MinimalRepo, error)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user