slotresource

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL