Documentation
¶
Overview ¶
Package vcs abstracts version control systems. Currently just git.
Index ¶
- type CommitOpts
- type Interface
- type Mock
- func (m *Mock) BranchContains(ctx context.Context, commit, branch string) (bool, error)
- func (m *Mock) Commit(ctx context.Context, opts CommitOpts) error
- func (m *Mock) CreateTag(ctx context.Context, commit, tag string, opts TagOpts) error
- func (m *Mock) CurrentBranch(ctx context.Context) (string, error)
- func (m *Mock) CurrentCommit(ctx context.Context) (string, error)
- func (m *Mock) DeleteTag(ctx context.Context, commit, tag string) error
- func (m *Mock) Fetch(ctx context.Context, upstream, ref string) error
- func (m *Mock) GetMainBranch(ctx context.Context, candidates []string) (string, error)
- func (m *Mock) Push(ctx context.Context, upstream, ref string, opts PushOpts) error
- func (m *Mock) ReadCommits(ctx context.Context, query string) ([]*model.Commit, error)
- func (m *Mock) ReadTags(ctx context.Context, query string) ([]string, error)
- func (m *Mock) SetCommits(commits ...*model.Commit) *Mock
- func (m *Mock) SetTags(tags ...string) *Mock
- type NotFoundError
- type PushOpts
- type TagOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitOpts ¶
type Interface ¶
type Interface interface { Fetch(ctx context.Context, upstream, ref string) error Push(ctx context.Context, upstream, ref string, opts PushOpts) error Commit(ctx context.Context, opts CommitOpts) error ReadCommits(ctx context.Context, query string) ([]*model.Commit, error) CreateTag(ctx context.Context, commit, tag string, opts TagOpts) error DeleteTag(ctx context.Context, commit, tag string) error ReadTags(ctx context.Context, query string) ([]string, error) GetMainBranch(ctx context.Context, candidates []string) (string, error) CurrentBranch(ctx context.Context) (string, error) BranchContains(ctx context.Context, commit, branch string) (bool, error) CurrentCommit(ctx context.Context) (string, error) }
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
func (*Mock) BranchContains ¶
func (*Mock) GetMainBranch ¶
func (*Mock) ReadCommits ¶
type NotFoundError ¶
type NotFoundError struct {
Ref string
}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.