Documentation ¶
Index ¶
- Variables
- func Module(c *di.Container)
- type CopyOption
- type CopyOptions
- type DiffsOption
- type DiffsOptions
- type SnapshotOption
- func WithMarkAsLatestInWorkspace() SnapshotOption
- func WithOnExistingCommit(commit string) SnapshotOption
- func WithOnRepo(repo vcs.RepoReaderGitWriter) SnapshotOption
- func WithOnTrunk() SnapshotOption
- func WithOnView(viewID string) SnapshotOption
- func WithPatchIDsFilter(patchIDs []string) SnapshotOption
- func WithPaths(paths []string) SnapshotOption
- func WithRevertCommitID(commitID string) SnapshotOption
- type SnapshotOptions
- type Snapshotter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCantSnapshotRebasing = errors.New("can't snapshot, rebasing in progress") ErrCantSnapshotWrongBranch = errors.New("can't snapshot, unexpected branch") )
Functions ¶
Types ¶
type CopyOption ¶
type CopyOption func(*CopyOptions)
func CopyWithPatchIDs ¶
func CopyWithPatchIDs(patchIDs []string) CopyOption
type CopyOptions ¶
type CopyOptions struct {
PatchIDs *[]string
}
type DiffsOption ¶
type DiffsOption func(*DiffsOptions)
func DiffWithPatchIDs ¶
func DiffWithPatchIDs(patchIDs []string) DiffsOption
func WithAllower ¶
func WithAllower(allower *unidiff.Allower) DiffsOption
type DiffsOptions ¶
type SnapshotOption ¶
type SnapshotOption func(*SnapshotOptions)
func WithMarkAsLatestInWorkspace ¶
func WithMarkAsLatestInWorkspace() SnapshotOption
func WithOnExistingCommit ¶
func WithOnExistingCommit(commit string) SnapshotOption
func WithOnRepo ¶
func WithOnRepo(repo vcs.RepoReaderGitWriter) SnapshotOption
func WithOnTrunk ¶
func WithOnTrunk() SnapshotOption
func WithOnView ¶
func WithOnView(viewID string) SnapshotOption
func WithPatchIDsFilter ¶
func WithPatchIDsFilter(patchIDs []string) SnapshotOption
func WithPaths ¶
func WithPaths(paths []string) SnapshotOption
func WithRevertCommitID ¶
func WithRevertCommitID(commitID string) SnapshotOption
type SnapshotOptions ¶
type SnapshotOptions struct {
// contains filtered or unexported fields
}
type Snapshotter ¶
type Snapshotter interface { Snapshot(codebaseID, workspaceID string, action snapshots.Action, options ...SnapshotOption) (*snapshots.Snapshot, error) Copy(ctx context.Context, snapshotID string, oo ...CopyOption) (*snapshots.Snapshot, error) Diffs(ctx context.Context, snapshotID string, oo ...DiffsOption) ([]unidiff.FileDiff, error) GetByID(context.Context, string) (*snapshots.Snapshot, error) }
todo: rename to snapshot service
func NewGitSnapshotter ¶
func NewGitSnapshotter( snapshotsRepo db_snapshots.Repository, workspaceReader db_workspace.WorkspaceReader, workspaceWriter db_workspace.WorkspaceWriter, viewRepo db_view.Repository, eventSender events.EventSender, executorProvider executor.Provider, logger *zap.Logger, ) Snapshotter
Click to show internal directories.
Click to hide internal directories.