Documentation
¶
Index ¶
- type SlotResource
- func (s *SlotResource) Create(ctx *agentcli.AppContext, slug string, opts map[string]string) (*resource.Record, error)
- func (s *SlotResource) Delete(ctx *agentcli.AppContext, id string) error
- func (s *SlotResource) Get(ctx *agentcli.AppContext, id string) (*resource.Record, error)
- func (s *SlotResource) List(ctx *agentcli.AppContext, filter resource.Filter) ([]resource.Record, error)
- func (s *SlotResource) Schema() resource.ResourceSchema
- func (s *SlotResource) Sync(ctx *agentcli.AppContext, id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlotResource ¶
type SlotResource struct {
// contains filtered or unexported fields
}
SlotResource implements Resource, Deleter, and Syncer for git worktree slots.
func New ¶
func New(fs dal.FileSystem, exec dal.Executor) *SlotResource
New creates a SlotResource with the given filesystem and executor.
func (*SlotResource) Create ¶
func (s *SlotResource) Create(ctx *agentcli.AppContext, slug string, opts map[string]string) (*resource.Record, error)
Create validates the name and creates a worktree slot.
func (*SlotResource) Delete ¶
func (s *SlotResource) Delete(ctx *agentcli.AppContext, id string) error
Delete removes a slot worktree after checking for uncommitted changes.
func (*SlotResource) Get ¶
func (s *SlotResource) Get(ctx *agentcli.AppContext, id string) (*resource.Record, error)
Get returns a single slot by name.
func (*SlotResource) List ¶
func (s *SlotResource) List(ctx *agentcli.AppContext, filter resource.Filter) ([]resource.Record, error)
List returns all slots for the project.
func (*SlotResource) Schema ¶
func (s *SlotResource) Schema() resource.ResourceSchema
Schema returns the resource schema for slots.
func (*SlotResource) Sync ¶
func (s *SlotResource) Sync(ctx *agentcli.AppContext, id string) error
Sync rebases the slot branch onto origin/main.
Click to show internal directories.
Click to hide internal directories.