Documentation
¶
Overview ¶
Package sqlite provides SQLite implementations of the repository interfaces.
Index ¶
- func NewTransacter(db *sqlx.DB) atomic.Transacter[repository.Resources]
- func ResourcesFactory(_ context.Context, ...) (repository.Resources, error)
- type EventRepo
- func (r EventRepo) Create(ctx context.Context, e domain.SystemEvent) error
- func (r EventRepo) ListByType(ctx context.Context, eventType string, limit int) ([]domain.SystemEvent, error)
- func (r EventRepo) ListByWorkspaceID(ctx context.Context, workspaceID string, limit int) ([]domain.SystemEvent, error)
- type GithubPRCheckRepo
- type GithubPRRepo
- func (r GithubPRRepo) Get(ctx context.Context, id string) (domain.GithubPullRequest, error)
- func (r GithubPRRepo) GetByNumber(ctx context.Context, owner, repo string, number int) (domain.GithubPullRequest, error)
- func (r GithubPRRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.GithubPullRequest, error)
- func (r GithubPRRepo) ListNonTerminal(ctx context.Context, workspaceID string) ([]domain.GithubPullRequest, error)
- func (r GithubPRRepo) Upsert(ctx context.Context, pr domain.GithubPullRequest) error
- type GithubPRReviewRepo
- type GitlabMRCheckRepo
- type GitlabMRRepo
- func (r GitlabMRRepo) Get(ctx context.Context, id string) (domain.GitlabMergeRequest, error)
- func (r GitlabMRRepo) GetByIID(ctx context.Context, projectPath string, iid int) (domain.GitlabMergeRequest, error)
- func (r GitlabMRRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.GitlabMergeRequest, error)
- func (r GitlabMRRepo) ListNonTerminal(ctx context.Context, workspaceID string) ([]domain.GitlabMergeRequest, error)
- func (r GitlabMRRepo) Upsert(ctx context.Context, mr domain.GitlabMergeRequest) error
- type GitlabMRReviewRepo
- type InstanceRepo
- func (r InstanceRepo) Create(ctx context.Context, inst domain.SubstrateInstance) error
- func (r InstanceRepo) Delete(ctx context.Context, id string) error
- func (r InstanceRepo) Get(ctx context.Context, id string) (domain.SubstrateInstance, error)
- func (r InstanceRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.SubstrateInstance, error)
- func (r InstanceRepo) Update(ctx context.Context, inst domain.SubstrateInstance) error
- type PlanRepo
- func (r PlanRepo) AppendFAQ(ctx context.Context, entry domain.FAQEntry) error
- func (r PlanRepo) Create(ctx context.Context, p domain.Plan) error
- func (r PlanRepo) Delete(ctx context.Context, id string) error
- func (r PlanRepo) Get(ctx context.Context, id string) (domain.Plan, error)
- func (r PlanRepo) GetByWorkItemID(ctx context.Context, workItemID string) (domain.Plan, error)
- func (r PlanRepo) Update(ctx context.Context, p domain.Plan) error
- type QuestionRepo
- func (r QuestionRepo) Create(ctx context.Context, q domain.Question) error
- func (r QuestionRepo) Get(ctx context.Context, id string) (domain.Question, error)
- func (r QuestionRepo) ListBySessionID(ctx context.Context, sessionID string) ([]domain.Question, error)
- func (r QuestionRepo) Update(ctx context.Context, q domain.Question) error
- func (r QuestionRepo) UpdateProposedAnswer(ctx context.Context, id, proposedAnswer string) error
- type ReviewRepo
- func (r ReviewRepo) CreateCritique(ctx context.Context, c domain.Critique) error
- func (r ReviewRepo) CreateCycle(ctx context.Context, rc domain.ReviewCycle) error
- func (r ReviewRepo) GetCritique(ctx context.Context, id string) (domain.Critique, error)
- func (r ReviewRepo) GetCycle(ctx context.Context, id string) (domain.ReviewCycle, error)
- func (r ReviewRepo) ListCritiquesByReviewCycleID(ctx context.Context, cycleID string) ([]domain.Critique, error)
- func (r ReviewRepo) ListCyclesBySessionID(ctx context.Context, sessionID string) ([]domain.ReviewCycle, error)
- func (r ReviewRepo) UpdateCritique(ctx context.Context, c domain.Critique) error
- func (r ReviewRepo) UpdateCycle(ctx context.Context, rc domain.ReviewCycle) error
- type SessionFilterLockRepo
- func (r SessionFilterLockRepo) Acquire(ctx context.Context, lock domain.NewSessionFilterLock) (domain.NewSessionFilterLock, bool, error)
- func (r SessionFilterLockRepo) Get(ctx context.Context, filterID string) (domain.NewSessionFilterLock, error)
- func (r SessionFilterLockRepo) Release(ctx context.Context, filterID, instanceID string) error
- func (r SessionFilterLockRepo) Renew(ctx context.Context, lock domain.NewSessionFilterLock) (domain.NewSessionFilterLock, bool, error)
- type SessionFilterRepo
- func (r SessionFilterRepo) Create(ctx context.Context, filter domain.NewSessionFilter) error
- func (r SessionFilterRepo) Delete(ctx context.Context, id string) error
- func (r SessionFilterRepo) Get(ctx context.Context, id string) (domain.NewSessionFilter, error)
- func (r SessionFilterRepo) GetByWorkspaceProviderName(ctx context.Context, workspaceID, provider, name string) (domain.NewSessionFilter, error)
- func (r SessionFilterRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.NewSessionFilter, error)
- func (r SessionFilterRepo) ListByWorkspaceProvider(ctx context.Context, workspaceID, provider string) ([]domain.NewSessionFilter, error)
- func (r SessionFilterRepo) Update(ctx context.Context, filter domain.NewSessionFilter) error
- type SessionRepo
- func (r SessionRepo) Create(ctx context.Context, item domain.Session) error
- func (r SessionRepo) Delete(ctx context.Context, id string) error
- func (r SessionRepo) Get(ctx context.Context, id string) (domain.Session, error)
- func (r SessionRepo) List(ctx context.Context, filter repository.SessionFilter) ([]domain.Session, error)
- func (r SessionRepo) Update(ctx context.Context, item domain.Session) error
- type SessionReviewArtifactRepo
- func (r SessionReviewArtifactRepo) ListByWorkItemID(ctx context.Context, workItemID string) ([]domain.SessionReviewArtifact, error)
- func (r SessionReviewArtifactRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.SessionReviewArtifact, error)
- func (r SessionReviewArtifactRepo) Upsert(ctx context.Context, link domain.SessionReviewArtifact) error
- type SubPlanRepo
- func (r SubPlanRepo) Create(ctx context.Context, sp domain.TaskPlan) error
- func (r SubPlanRepo) Delete(ctx context.Context, id string) error
- func (r SubPlanRepo) Get(ctx context.Context, id string) (domain.TaskPlan, error)
- func (r SubPlanRepo) ListByPlanID(ctx context.Context, planID string) ([]domain.TaskPlan, error)
- func (r SubPlanRepo) Update(ctx context.Context, sp domain.TaskPlan) error
- type TaskRepo
- func (r TaskRepo) Create(ctx context.Context, s domain.Task) error
- func (r TaskRepo) Delete(ctx context.Context, id string) error
- func (r TaskRepo) Get(ctx context.Context, id string) (domain.Task, error)
- func (r TaskRepo) ListByOwnerInstanceID(ctx context.Context, instanceID string) ([]domain.Task, error)
- func (r TaskRepo) ListBySubPlanID(ctx context.Context, subPlanID string) ([]domain.Task, error)
- func (r TaskRepo) ListByWorkItemID(ctx context.Context, workItemID string) ([]domain.Task, error)
- func (r TaskRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.Task, error)
- func (r TaskRepo) SearchHistory(ctx context.Context, filter domain.SessionHistoryFilter) ([]domain.SessionHistoryEntry, error)
- func (r TaskRepo) Update(ctx context.Context, s domain.Task) error
- type WorkspaceRepo
- func (r WorkspaceRepo) Create(ctx context.Context, ws domain.Workspace) error
- func (r WorkspaceRepo) Delete(ctx context.Context, id string) error
- func (r WorkspaceRepo) Get(ctx context.Context, id string) (domain.Workspace, error)
- func (r WorkspaceRepo) Update(ctx context.Context, ws domain.Workspace) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransacter ¶
func NewTransacter(db *sqlx.DB) atomic.Transacter[repository.Resources]
NewTransacter creates a transacter backed by the given DB.
func ResourcesFactory ¶
func ResourcesFactory( _ context.Context, _ *generic.Transacter[generic.SQLXRemote, repository.Resources], tx generic.SQLXRemote, ) (repository.Resources, error)
ResourcesFactory creates transaction-bound repositories from a transaction handle.
Types ¶
type EventRepo ¶
type EventRepo struct {
// contains filtered or unexported fields
}
EventRepo implements repository.EventRepository using SQLite.
func NewEventRepo ¶
func NewEventRepo(remote generic.SQLXRemote) EventRepo
func (EventRepo) ListByType ¶
func (EventRepo) ListByWorkspaceID ¶
type GithubPRCheckRepo ¶ added in v0.0.28
type GithubPRCheckRepo struct {
// contains filtered or unexported fields
}
GithubPRCheckRepo implements repository.GithubPRCheckRepository using SQLite.
func NewGithubPRCheckRepo ¶ added in v0.0.28
func NewGithubPRCheckRepo(remote generic.SQLXRemote) GithubPRCheckRepo
func (GithubPRCheckRepo) DeleteByPRID ¶ added in v0.0.28
func (r GithubPRCheckRepo) DeleteByPRID(ctx context.Context, prID string) error
func (GithubPRCheckRepo) ListByPRID ¶ added in v0.0.28
func (r GithubPRCheckRepo) ListByPRID(ctx context.Context, prID string) ([]domain.GithubPRCheck, error)
func (GithubPRCheckRepo) Upsert ¶ added in v0.0.28
func (r GithubPRCheckRepo) Upsert(ctx context.Context, check domain.GithubPRCheck) error
type GithubPRRepo ¶
type GithubPRRepo struct {
// contains filtered or unexported fields
}
GithubPRRepo implements repository.GithubPullRequestRepository using SQLite.
func NewGithubPRRepo ¶
func NewGithubPRRepo(remote generic.SQLXRemote) GithubPRRepo
func (GithubPRRepo) Get ¶
func (r GithubPRRepo) Get(ctx context.Context, id string) (domain.GithubPullRequest, error)
func (GithubPRRepo) GetByNumber ¶
func (r GithubPRRepo) GetByNumber(ctx context.Context, owner, repo string, number int) (domain.GithubPullRequest, error)
func (GithubPRRepo) ListByWorkspaceID ¶
func (r GithubPRRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.GithubPullRequest, error)
func (GithubPRRepo) ListNonTerminal ¶
func (r GithubPRRepo) ListNonTerminal(ctx context.Context, workspaceID string) ([]domain.GithubPullRequest, error)
func (GithubPRRepo) Upsert ¶
func (r GithubPRRepo) Upsert(ctx context.Context, pr domain.GithubPullRequest) error
type GithubPRReviewRepo ¶ added in v0.0.28
type GithubPRReviewRepo struct {
// contains filtered or unexported fields
}
GithubPRReviewRepo implements repository.GithubPRReviewRepository using SQLite.
func NewGithubPRReviewRepo ¶ added in v0.0.28
func NewGithubPRReviewRepo(remote generic.SQLXRemote) GithubPRReviewRepo
func (GithubPRReviewRepo) DeleteByPRID ¶ added in v0.0.28
func (r GithubPRReviewRepo) DeleteByPRID(ctx context.Context, prID string) error
func (GithubPRReviewRepo) ListByPRID ¶ added in v0.0.28
func (r GithubPRReviewRepo) ListByPRID(ctx context.Context, prID string) ([]domain.GithubPRReview, error)
func (GithubPRReviewRepo) Upsert ¶ added in v0.0.28
func (r GithubPRReviewRepo) Upsert(ctx context.Context, review domain.GithubPRReview) error
type GitlabMRCheckRepo ¶ added in v0.0.28
type GitlabMRCheckRepo struct {
// contains filtered or unexported fields
}
GitlabMRCheckRepo implements repository.GitlabMRCheckRepository using SQLite.
func NewGitlabMRCheckRepo ¶ added in v0.0.28
func NewGitlabMRCheckRepo(remote generic.SQLXRemote) GitlabMRCheckRepo
func (GitlabMRCheckRepo) DeleteByMRID ¶ added in v0.0.28
func (r GitlabMRCheckRepo) DeleteByMRID(ctx context.Context, mrID string) error
func (GitlabMRCheckRepo) ListByMRID ¶ added in v0.0.28
func (r GitlabMRCheckRepo) ListByMRID(ctx context.Context, mrID string) ([]domain.GitlabMRCheck, error)
func (GitlabMRCheckRepo) Upsert ¶ added in v0.0.28
func (r GitlabMRCheckRepo) Upsert(ctx context.Context, check domain.GitlabMRCheck) error
type GitlabMRRepo ¶
type GitlabMRRepo struct {
// contains filtered or unexported fields
}
GitlabMRRepo implements repository.GitlabMergeRequestRepository using SQLite.
func NewGitlabMRRepo ¶
func NewGitlabMRRepo(remote generic.SQLXRemote) GitlabMRRepo
func (GitlabMRRepo) Get ¶
func (r GitlabMRRepo) Get(ctx context.Context, id string) (domain.GitlabMergeRequest, error)
func (GitlabMRRepo) GetByIID ¶
func (r GitlabMRRepo) GetByIID(ctx context.Context, projectPath string, iid int) (domain.GitlabMergeRequest, error)
func (GitlabMRRepo) ListByWorkspaceID ¶
func (r GitlabMRRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.GitlabMergeRequest, error)
func (GitlabMRRepo) ListNonTerminal ¶
func (r GitlabMRRepo) ListNonTerminal(ctx context.Context, workspaceID string) ([]domain.GitlabMergeRequest, error)
func (GitlabMRRepo) Upsert ¶
func (r GitlabMRRepo) Upsert(ctx context.Context, mr domain.GitlabMergeRequest) error
type GitlabMRReviewRepo ¶ added in v0.0.28
type GitlabMRReviewRepo struct {
// contains filtered or unexported fields
}
GitlabMRReviewRepo implements repository.GitlabMRReviewRepository using SQLite.
func NewGitlabMRReviewRepo ¶ added in v0.0.28
func NewGitlabMRReviewRepo(remote generic.SQLXRemote) GitlabMRReviewRepo
func (GitlabMRReviewRepo) DeleteByMRID ¶ added in v0.0.28
func (r GitlabMRReviewRepo) DeleteByMRID(ctx context.Context, mrID string) error
func (GitlabMRReviewRepo) ListByMRID ¶ added in v0.0.28
func (r GitlabMRReviewRepo) ListByMRID(ctx context.Context, mrID string) ([]domain.GitlabMRReview, error)
func (GitlabMRReviewRepo) Upsert ¶ added in v0.0.28
func (r GitlabMRReviewRepo) Upsert(ctx context.Context, review domain.GitlabMRReview) error
type InstanceRepo ¶
type InstanceRepo struct {
// contains filtered or unexported fields
}
InstanceRepo implements repository.InstanceRepository using SQLite.
func NewInstanceRepo ¶
func NewInstanceRepo(remote generic.SQLXRemote) InstanceRepo
func (InstanceRepo) Create ¶
func (r InstanceRepo) Create(ctx context.Context, inst domain.SubstrateInstance) error
func (InstanceRepo) Get ¶
func (r InstanceRepo) Get(ctx context.Context, id string) (domain.SubstrateInstance, error)
func (InstanceRepo) ListByWorkspaceID ¶
func (r InstanceRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.SubstrateInstance, error)
func (InstanceRepo) Update ¶
func (r InstanceRepo) Update(ctx context.Context, inst domain.SubstrateInstance) error
type PlanRepo ¶
type PlanRepo struct {
// contains filtered or unexported fields
}
PlanRepo implements repository.PlanRepository using SQLite.
func NewPlanRepo ¶
func NewPlanRepo(remote generic.SQLXRemote) PlanRepo
func (PlanRepo) AppendFAQ ¶
AppendFAQ atomically appends a new FAQ entry to the plan's FAQ list. Uses a single UPDATE with SQLite JSON functions to avoid read-modify-write races.
func (PlanRepo) GetByWorkItemID ¶
type QuestionRepo ¶
type QuestionRepo struct {
// contains filtered or unexported fields
}
QuestionRepo implements repository.QuestionRepository using SQLite.
func NewQuestionRepo ¶
func NewQuestionRepo(remote generic.SQLXRemote) QuestionRepo
func (QuestionRepo) ListBySessionID ¶
func (QuestionRepo) UpdateProposedAnswer ¶
func (r QuestionRepo) UpdateProposedAnswer(ctx context.Context, id, proposedAnswer string) error
UpdateProposedAnswer atomically updates proposed_answer only when the question is still in the 'escalated' state. If the question was already answered (concurrent ResolveEscalated), the conditional WHERE clause makes this a no-op (0 rows affected), which is treated as success — the sub-agent is already unblocked.
type ReviewRepo ¶
type ReviewRepo struct {
// contains filtered or unexported fields
}
ReviewRepo implements repository.ReviewRepository using SQLite.
func NewReviewRepo ¶
func NewReviewRepo(remote generic.SQLXRemote) ReviewRepo
func (ReviewRepo) CreateCritique ¶
func (ReviewRepo) CreateCycle ¶
func (r ReviewRepo) CreateCycle(ctx context.Context, rc domain.ReviewCycle) error
func (ReviewRepo) GetCritique ¶
func (ReviewRepo) GetCycle ¶
func (r ReviewRepo) GetCycle(ctx context.Context, id string) (domain.ReviewCycle, error)
func (ReviewRepo) ListCritiquesByReviewCycleID ¶
func (ReviewRepo) ListCyclesBySessionID ¶
func (r ReviewRepo) ListCyclesBySessionID(ctx context.Context, sessionID string) ([]domain.ReviewCycle, error)
func (ReviewRepo) UpdateCritique ¶
func (ReviewRepo) UpdateCycle ¶
func (r ReviewRepo) UpdateCycle(ctx context.Context, rc domain.ReviewCycle) error
type SessionFilterLockRepo ¶
type SessionFilterLockRepo struct {
// contains filtered or unexported fields
}
SessionFilterLockRepo implements repository.NewSessionFilterLockRepository using SQLite.
func NewSessionFilterLockRepo ¶
func NewSessionFilterLockRepo(remote generic.SQLXRemote) SessionFilterLockRepo
NewSessionFilterLockRepo creates a lock repository for New Session filters.
func (SessionFilterLockRepo) Acquire ¶
func (r SessionFilterLockRepo) Acquire(ctx context.Context, lock domain.NewSessionFilterLock) (domain.NewSessionFilterLock, bool, error)
func (SessionFilterLockRepo) Get ¶
func (r SessionFilterLockRepo) Get(ctx context.Context, filterID string) (domain.NewSessionFilterLock, error)
func (SessionFilterLockRepo) Release ¶
func (r SessionFilterLockRepo) Release(ctx context.Context, filterID, instanceID string) error
func (SessionFilterLockRepo) Renew ¶
func (r SessionFilterLockRepo) Renew(ctx context.Context, lock domain.NewSessionFilterLock) (domain.NewSessionFilterLock, bool, error)
type SessionFilterRepo ¶
type SessionFilterRepo struct {
// contains filtered or unexported fields
}
SessionFilterRepo implements repository.NewSessionFilterRepository using SQLite.
func NewSessionFilterRepo ¶
func NewSessionFilterRepo(remote generic.SQLXRemote) SessionFilterRepo
NewSessionFilterRepo creates a repository for saved New Session filters.
func (SessionFilterRepo) Create ¶
func (r SessionFilterRepo) Create(ctx context.Context, filter domain.NewSessionFilter) error
func (SessionFilterRepo) Delete ¶
func (r SessionFilterRepo) Delete(ctx context.Context, id string) error
func (SessionFilterRepo) Get ¶
func (r SessionFilterRepo) Get(ctx context.Context, id string) (domain.NewSessionFilter, error)
func (SessionFilterRepo) GetByWorkspaceProviderName ¶
func (r SessionFilterRepo) GetByWorkspaceProviderName(ctx context.Context, workspaceID, provider, name string) (domain.NewSessionFilter, error)
func (SessionFilterRepo) ListByWorkspaceID ¶
func (r SessionFilterRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.NewSessionFilter, error)
func (SessionFilterRepo) ListByWorkspaceProvider ¶
func (r SessionFilterRepo) ListByWorkspaceProvider(ctx context.Context, workspaceID, provider string) ([]domain.NewSessionFilter, error)
func (SessionFilterRepo) Update ¶
func (r SessionFilterRepo) Update(ctx context.Context, filter domain.NewSessionFilter) error
type SessionRepo ¶
type SessionRepo struct {
// contains filtered or unexported fields
}
SessionRepo implements repository.WorkItemRepository using SQLite.
func NewSessionRepo ¶
func NewSessionRepo(remote generic.SQLXRemote) SessionRepo
NewSessionRepo creates a new WorkItemRepo.
func (SessionRepo) List ¶
func (r SessionRepo) List(ctx context.Context, filter repository.SessionFilter) ([]domain.Session, error)
type SessionReviewArtifactRepo ¶
type SessionReviewArtifactRepo struct {
// contains filtered or unexported fields
}
SessionReviewArtifactRepo implements repository.SessionReviewArtifactRepository using SQLite.
func NewSessionReviewArtifactRepo ¶
func NewSessionReviewArtifactRepo(remote generic.SQLXRemote) SessionReviewArtifactRepo
func (SessionReviewArtifactRepo) ListByWorkItemID ¶
func (r SessionReviewArtifactRepo) ListByWorkItemID(ctx context.Context, workItemID string) ([]domain.SessionReviewArtifact, error)
func (SessionReviewArtifactRepo) ListByWorkspaceID ¶
func (r SessionReviewArtifactRepo) ListByWorkspaceID(ctx context.Context, workspaceID string) ([]domain.SessionReviewArtifact, error)
func (SessionReviewArtifactRepo) Upsert ¶
func (r SessionReviewArtifactRepo) Upsert(ctx context.Context, link domain.SessionReviewArtifact) error
type SubPlanRepo ¶
type SubPlanRepo struct {
// contains filtered or unexported fields
}
SubPlanRepo implements repository.SubPlanRepository using SQLite.
func NewSubPlanRepo ¶
func NewSubPlanRepo(remote generic.SQLXRemote) SubPlanRepo
func (SubPlanRepo) ListByPlanID ¶
type TaskRepo ¶
type TaskRepo struct {
// contains filtered or unexported fields
}
TaskRepo implements repository.TaskRepository using SQLite.
func NewTaskRepo ¶
func NewTaskRepo(remote generic.SQLXRemote) TaskRepo
func (TaskRepo) ListByOwnerInstanceID ¶
func (TaskRepo) ListBySubPlanID ¶
func (TaskRepo) ListByWorkItemID ¶
func (TaskRepo) ListByWorkspaceID ¶
func (TaskRepo) SearchHistory ¶
func (r TaskRepo) SearchHistory(ctx context.Context, filter domain.SessionHistoryFilter) ([]domain.SessionHistoryEntry, error)
type WorkspaceRepo ¶
type WorkspaceRepo struct {
// contains filtered or unexported fields
}
WorkspaceRepo implements repository.WorkspaceRepository using SQLite.
func NewWorkspaceRepo ¶
func NewWorkspaceRepo(remote generic.SQLXRemote) WorkspaceRepo
Source Files
¶
- event.go
- github_pr_check.go
- github_pr_review.go
- github_pull_request.go
- gitlab_merge_request.go
- gitlab_mr_check.go
- gitlab_mr_review.go
- helpers.go
- instance.go
- interfaces_check.go
- new_session_filter.go
- plan.go
- question.go
- resources.go
- review.go
- session.go
- session_review_artifact.go
- sub_plan.go
- transacter.go
- work_item.go
- workspace.go