Documentation ¶
Index ¶
- func EnsureCodebaseStatus(repo vcs.RepoGitWriter) error
- type CopyPatchesOption
- type CopyPatchesOptions
- type CreateWorkspaceRequest
- type DiffsOption
- type DiffsOptions
- type Service
- type WorkspaceService
- func (s *WorkspaceService) CopyPatches(ctx context.Context, dist, src *workspace.Workspace, opts ...CopyPatchesOption) error
- func (s *WorkspaceService) Create(req CreateWorkspaceRequest) (*workspace.Workspace, error)
- func (svc *WorkspaceService) CreateWelcomeWorkspace(codebaseID, userID, codebaseName string) error
- func (s *WorkspaceService) Diffs(ctx context.Context, workspaceID string, oo ...DiffsOption) ([]unidiff.FileDiff, bool, error)
- func (s *WorkspaceService) GetByID(ctx context.Context, id string) (*workspace.Workspace, error)
- func (s *WorkspaceService) HasConflicts(ctx context.Context, ws *workspace.Workspace) (bool, error)
- func (s *WorkspaceService) LandChange(ctx context.Context, ws *workspace.Workspace, patchIDs []string, ...) (*change.Change, error)
- func (s *WorkspaceService) RemovePatches(ctx context.Context, allower *unidiff.Allower, ws *workspace.Workspace, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureCodebaseStatus ¶
func EnsureCodebaseStatus(repo vcs.RepoGitWriter) error
Types ¶
type CopyPatchesOption ¶
type CopyPatchesOption func(*CopyPatchesOptions)
func WithPatchIDs ¶
func WithPatchIDs(patchIDs []string) CopyPatchesOption
type CopyPatchesOptions ¶
type CopyPatchesOptions struct {
PatchIDs *[]string
}
type CreateWorkspaceRequest ¶
type DiffsOption ¶
type DiffsOption func(*DiffsOptions)
func WithAllower ¶
func WithAllower(allower *unidiff.Allower) DiffsOption
func WithVCSDiffOptions ¶
func WithVCSDiffOptions(options ...vcs.DiffOption) DiffsOption
type DiffsOptions ¶
type DiffsOptions struct { Allower *unidiff.Allower VCSDiffOptions []vcs.DiffOption }
type Service ¶
type Service interface { Create(CreateWorkspaceRequest) (*workspace.Workspace, error) GetByID(context.Context, string) (*workspace.Workspace, error) LandChange(ctx context.Context, ws *workspace.Workspace, patchIDs []string, diffOptions ...vcs.DiffOption) (*change.Change, error) CreateWelcomeWorkspace(codebaseID, userID, codebaseName string) error Diffs(context.Context, string, ...DiffsOption) ([]unidiff.FileDiff, bool, error) CopyPatches(ctx context.Context, src, dist *workspace.Workspace, opts ...CopyPatchesOption) error RemovePatches(context.Context, *unidiff.Allower, *workspace.Workspace, ...string) error HasConflicts(context.Context, *workspace.Workspace) (bool, error) }
type WorkspaceService ¶
type WorkspaceService struct {
// contains filtered or unexported fields
}
func New ¶
func New( logger *zap.Logger, analyticsClient analytics.Client, workspaceWriter db.WorkspaceWriter, workspaceReader db.WorkspaceReader, userRepo user_db.Repository, reviewRepo db_review.ReviewRepository, commentsService *service_comments.Service, changeService *service_change.Service, activitySender sender.ActivitySender, executorProvider executor.Provider, eventsSender events.EventSender, snapshotterQueue worker_snapshots.Queue, snap snapshotter.Snapshotter, buildQueue *workers_ci.BuildQueue, ) *WorkspaceService
func (*WorkspaceService) CopyPatches ¶
func (s *WorkspaceService) CopyPatches(ctx context.Context, dist, src *workspace.Workspace, opts ...CopyPatchesOption) error
func (*WorkspaceService) Create ¶
func (s *WorkspaceService) Create(req CreateWorkspaceRequest) (*workspace.Workspace, error)
func (*WorkspaceService) CreateWelcomeWorkspace ¶
func (svc *WorkspaceService) CreateWelcomeWorkspace(codebaseID, userID, codebaseName string) error
func (*WorkspaceService) Diffs ¶
func (s *WorkspaceService) Diffs(ctx context.Context, workspaceID string, oo ...DiffsOption) ([]unidiff.FileDiff, bool, error)
func (*WorkspaceService) HasConflicts ¶
func (*WorkspaceService) LandChange ¶
Click to show internal directories.
Click to hide internal directories.