MCPcopy
hub / github.com/gogs/gogs / ModuleStore

Interface ModuleStore

internal/gitutil/module.go:8–31  ·  view source on GitHub ↗

ModuleStore is the interface for Git operations.

Source from the content-addressed store, hash-verified

6
7// ModuleStore is the interface for Git operations.
8type ModuleStore interface {
9 // RemoteAdd adds a new remote to the repository in given path.
10 RemoteAdd(repoPath, name, url string, opts ...git.RemoteAddOptions) error
11 // DiffNameOnly returns a list of changed files between base and head revisions
12 // of the repository in given path.
13 DiffNameOnly(repoPath, base, head string, opts ...git.DiffNameOnlyOptions) ([]string, error)
14 // Log returns a list of commits in the state of given revision of the
15 // repository in given path. The returned list is in reverse chronological
16 // order.
17 Log(repoPath, rev string, opts ...git.LogOptions) ([]*git.Commit, error)
18 // MergeBase returns merge base between base and head revisions of the
19 // repository in given path.
20 MergeBase(repoPath, base, head string, opts ...git.MergeBaseOptions) (string, error)
21 // RemoteRemove removes a remote from the repository in given path.
22 RemoteRemove(repoPath, name string, opts ...git.RemoteRemoveOptions) error
23 // RepoTags returns a list of tags of the repository in given path.
24 RepoTags(repoPath string, opts ...git.TagsOptions) ([]string, error)
25
26 // PullRequestMeta gathers pull request metadata based on given head and base
27 // information.
28 PullRequestMeta(headPath, basePath, headBranch, baseBranch string) (*PullRequestMeta, error)
29 // ListTagsAfter returns a list of tags "after" (exclusive) given tag.
30 ListTagsAfter(repoPath, after string, limit int) (*TagsPage, error)
31}
32
33// module holds the real implementation.
34type module struct{}

Callers 29

SaveAddressMethod · 0.65
UpdatePatchMethod · 0.65
PushToBaseRepoMethod · 0.65
PullRequestMetaMethod · 0.65
RemoteAddMethod · 0.65
PullRequestMetaMethod · 0.65
DiffNameOnlyMethod · 0.65
WikiFunction · 0.65
WikiPagesFunction · 0.65
GetAllCommitsFunction · 0.65
PullRequestMetaMethod · 0.65

Implementers 2

MockModuleStoreinternal/gitutil/mocks.go
moduleinternal/gitutil/module.go

Calls

no outgoing calls

Tested by

no test coverage detected