Documentation
¶
Index ¶
- func NewWorkspaceService() workspace.WorkspaceService
- type FinderService
- func (f *FinderService) FindByPath(ctx context.Context, ws workspace.WorkspaceService, path string) (*repository.Location, error)
- func (f *FinderService) FindByReference(ctx context.Context, ws workspace.WorkspaceService, ref repository.Reference) (*repository.Location, error)
- func (f *FinderService) ListAllRepository(ctx context.Context, ws workspace.WorkspaceService, opts workspace.ListOptions) iter.Seq2[*repository.Location, error]
- func (f *FinderService) ListRepositoryInRoot(ctx context.Context, l workspace.LayoutService, opts workspace.ListOptions) iter.Seq2[*repository.Location, error]
- type LayoutService
- func (l *LayoutService) CreateRepositoryFolder(ref repository.Reference) (string, error)
- func (l *LayoutService) DeleteRepository(ref repository.Reference) error
- func (l *LayoutService) ExactMatch(path string) (*repository.Reference, error)
- func (l *LayoutService) GetRoot() string
- func (l *LayoutService) Match(path string) (*repository.Reference, error)
- func (l *LayoutService) PathFor(ref repository.Reference) string
- type WorkspaceService
- func (s *WorkspaceService) AddRoot(root workspace.Root, asPrimary bool) error
- func (s *WorkspaceService) GetLayoutFor(root workspace.Root) workspace.LayoutService
- func (s *WorkspaceService) GetPrimaryLayout() workspace.LayoutService
- func (s *WorkspaceService) GetPrimaryRoot() workspace.Root
- func (s *WorkspaceService) GetRoots() []workspace.Root
- func (s *WorkspaceService) HasChanges() bool
- func (s *WorkspaceService) MarkSaved()
- func (s *WorkspaceService) RemoveRoot(path workspace.Root) error
- func (s *WorkspaceService) SetPrimaryRoot(path workspace.Root) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWorkspaceService ¶
func NewWorkspaceService() workspace.WorkspaceService
NewWorkspaceService creates a new instance of RootService
Types ¶
type FinderService ¶
type FinderService struct{}
func NewFinderService ¶
func NewFinderService() *FinderService
func (*FinderService) FindByPath ¶
func (f *FinderService) FindByPath(ctx context.Context, ws workspace.WorkspaceService, path string) (*repository.Location, error)
FindByPath implements workspace.FinderService.
func (*FinderService) FindByReference ¶
func (f *FinderService) FindByReference(ctx context.Context, ws workspace.WorkspaceService, ref repository.Reference) (*repository.Location, error)
FindByReference implements workspace.FinderService.
func (*FinderService) ListAllRepository ¶
func (f *FinderService) ListAllRepository(ctx context.Context, ws workspace.WorkspaceService, opts workspace.ListOptions) iter.Seq2[*repository.Location, error]
ListAllRepository implements workspace.FinderService.
func (*FinderService) ListRepositoryInRoot ¶
func (f *FinderService) ListRepositoryInRoot(ctx context.Context, l workspace.LayoutService, opts workspace.ListOptions) iter.Seq2[*repository.Location, error]
ListRepositoryInRoot implements workspace.FinderService.
type LayoutService ¶
type LayoutService struct {
// contains filtered or unexported fields
}
LayoutService is a filesystem-based standard repository layout implementation
func NewLayoutService ¶
func NewLayoutService(root workspace.Root) *LayoutService
NewLayoutService creates a new instance of LayoutService
func (*LayoutService) CreateRepositoryFolder ¶
func (l *LayoutService) CreateRepositoryFolder(ref repository.Reference) (string, error)
func (*LayoutService) DeleteRepository ¶
func (l *LayoutService) DeleteRepository(ref repository.Reference) error
func (*LayoutService) ExactMatch ¶
func (l *LayoutService) ExactMatch(path string) (*repository.Reference, error)
ExactMatch returns the reference corresponding exactly to the given path
func (*LayoutService) GetRoot ¶
func (l *LayoutService) GetRoot() string
GetRoot returns the root of the layout
func (*LayoutService) Match ¶
func (l *LayoutService) Match(path string) (*repository.Reference, error)
Match returns the reference corresponding to the given path
func (*LayoutService) PathFor ¶
func (l *LayoutService) PathFor(ref repository.Reference) string
type WorkspaceService ¶
type WorkspaceService struct {
// contains filtered or unexported fields
}
WorkspaceService manages workspace roots stored in the filesystem
func (*WorkspaceService) AddRoot ¶
func (s *WorkspaceService) AddRoot(root workspace.Root, asPrimary bool) error
AddRoot adds a new workspace root
func (*WorkspaceService) GetLayoutFor ¶
func (s *WorkspaceService) GetLayoutFor(root workspace.Root) workspace.LayoutService
GetLayoutFor returns a Layout for the root
func (*WorkspaceService) GetPrimaryLayout ¶
func (s *WorkspaceService) GetPrimaryLayout() workspace.LayoutService
GetPrimaryLayout returns a Layout for the primary root
func (*WorkspaceService) GetPrimaryRoot ¶
func (s *WorkspaceService) GetPrimaryRoot() workspace.Root
GetPrimaryRoot returns the primary workspace root
func (*WorkspaceService) GetRoots ¶
func (s *WorkspaceService) GetRoots() []workspace.Root
GetRoots returns all registered workspace roots
func (*WorkspaceService) HasChanges ¶
func (s *WorkspaceService) HasChanges() bool
HasChanges implements workspace.WorkspaceService.
func (*WorkspaceService) MarkSaved ¶
func (s *WorkspaceService) MarkSaved()
MarkSaved implements workspace.WorkspaceService.
func (*WorkspaceService) RemoveRoot ¶
func (s *WorkspaceService) RemoveRoot(path workspace.Root) error
RemoveRoot removes the specified workspace root
func (*WorkspaceService) SetPrimaryRoot ¶
func (s *WorkspaceService) SetPrimaryRoot(path workspace.Root) error
SetPrimaryRoot sets the specified path as the primary workspace root