Documentation
¶
Index ¶
- func AskConfirmation(a *app.App) bool
- func HandleBranch(ctx context.Context, a *app.App, r BranchReq) (presenters.BranchView, error)
- func HandleCommitDelete(ctx context.Context, a *app.App, r CommitDeleteReq) error
- func HandleCommitParents(ctx context.Context, a *app.App, r CommitParentsReq) (presenters.CommitParentsView, error)
- func HandleCommitUpdate(ctx context.Context, a *app.App, r CommitUpdateReq) (*vers.CommitInfo, error)
- func HandleCommitsList(ctx context.Context, a *app.App, r CommitsListReq) (presenters.CommitsListView, error)
- func HandleConnect(ctx context.Context, a *app.App, r ConnectReq) (presenters.ConnectView, error)
- func HandleCopy(ctx context.Context, a *app.App, r CopyReq) (presenters.CopyView, error)
- func HandleExecute(ctx context.Context, a *app.App, r ExecuteReq) (presenters.ExecuteView, error)
- func HandleInfo(ctx context.Context, a *app.App, r InfoReq) (presenters.InfoView, error)
- func HandleKill(ctx context.Context, a *app.App, r KillReq) error
- func HandlePause(ctx context.Context, a *app.App, r PauseReq) (presenters.PauseView, error)
- func HandleResize(ctx context.Context, a *app.App, r ResizeReq) (string, error)
- func HandleResume(ctx context.Context, a *app.App, r ResumeReq) (presenters.ResumeView, error)
- func HandleRun(ctx context.Context, a *app.App, r RunReq) (presenters.RunView, error)
- func HandleRunCommit(ctx context.Context, a *app.App, r RunCommitReq) (presenters.RunCommitView, error)
- func HandleStatus(ctx context.Context, a *app.App, req StatusReq) (presenters.StatusView, error)
- func HandleTagCreate(ctx context.Context, a *app.App, r TagCreateReq) (*vers.CreateTagResponse, error)
- func HandleTagDelete(ctx context.Context, a *app.App, r TagDeleteReq) error
- func HandleTagGet(ctx context.Context, a *app.App, r TagGetReq) (*vers.TagInfo, error)
- func HandleTagList(ctx context.Context, a *app.App, r TagListReq) (presenters.TagListView, error)
- func HandleTagUpdate(ctx context.Context, a *app.App, r TagUpdateReq) error
- func HandleTunnel(ctx context.Context, a *app.App, r TunnelReq) (presenters.TunnelView, error)
- func HandleUpgrade(a *app.App, r UpgradeReq) error
- type BranchReq
- type CommitCreateReq
- type CommitCreateView
- type CommitDeleteReq
- type CommitParentsReq
- type CommitUpdateReq
- type CommitsListReq
- type ConnectReq
- type CopyReq
- type ExecuteReq
- type InfoReq
- type KillDTO
- type KillReq
- type PauseReq
- type ResizeReq
- type ResumeReq
- type RunCommitReq
- type RunReq
- type StatusReq
- type TagCreateReq
- type TagDeleteReq
- type TagGetReq
- type TagListReq
- type TagUpdateReq
- type TunnelReq
- type UpgradeReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskConfirmation ¶
AskConfirmation uses the app prompter to confirm (fallback to default prompt if unavailable).
func HandleBranch ¶
func HandleBranch(ctx context.Context, a *app.App, r BranchReq) (presenters.BranchView, error)
func HandleCommitDelete ¶ added in v0.7.0
func HandleCommitParents ¶ added in v0.7.0
func HandleCommitParents(ctx context.Context, a *app.App, r CommitParentsReq) (presenters.CommitParentsView, error)
func HandleCommitUpdate ¶ added in v0.7.0
func HandleCommitUpdate(ctx context.Context, a *app.App, r CommitUpdateReq) (*vers.CommitInfo, error)
func HandleCommitsList ¶ added in v0.7.0
func HandleCommitsList(ctx context.Context, a *app.App, r CommitsListReq) (presenters.CommitsListView, error)
func HandleConnect ¶
func HandleConnect(ctx context.Context, a *app.App, r ConnectReq) (presenters.ConnectView, error)
func HandleCopy ¶
func HandleExecute ¶
func HandleExecute(ctx context.Context, a *app.App, r ExecuteReq) (presenters.ExecuteView, error)
func HandleInfo ¶ added in v0.7.0
func HandlePause ¶
func HandleResize ¶ added in v0.7.0
func HandleResume ¶
func HandleResume(ctx context.Context, a *app.App, r ResumeReq) (presenters.ResumeView, error)
func HandleRunCommit ¶
func HandleRunCommit(ctx context.Context, a *app.App, r RunCommitReq) (presenters.RunCommitView, error)
func HandleStatus ¶
func HandleStatus(ctx context.Context, a *app.App, req StatusReq) (presenters.StatusView, error)
HandleStatus performs the status command logic using services and utilities.
func HandleTagCreate ¶ added in v0.7.0
func HandleTagCreate(ctx context.Context, a *app.App, r TagCreateReq) (*vers.CreateTagResponse, error)
func HandleTagDelete ¶ added in v0.7.0
func HandleTagGet ¶ added in v0.7.0
func HandleTagList ¶ added in v0.7.0
func HandleTagList(ctx context.Context, a *app.App, r TagListReq) (presenters.TagListView, error)
func HandleTagUpdate ¶ added in v0.7.0
func HandleTunnel ¶ added in v0.6.0
func HandleTunnel(ctx context.Context, a *app.App, r TunnelReq) (presenters.TunnelView, error)
HandleTunnel sets up an SSH port-forwarding tunnel to the VM. It blocks until ctx is cancelled (e.g. Ctrl-C).
func HandleUpgrade ¶
func HandleUpgrade(a *app.App, r UpgradeReq) error
Types ¶
type CommitCreateReq ¶ added in v0.7.0
type CommitCreateReq struct {
Target string
}
type CommitCreateView ¶ added in v0.7.0
type CommitCreateView struct {
CommitID string `json:"commit_id"`
VmID string `json:"vm_id"`
UsedHEAD bool `json:"used_head,omitempty"`
}
func HandleCommitCreate ¶ added in v0.7.0
func HandleCommitCreate(ctx context.Context, a *app.App, r CommitCreateReq) (CommitCreateView, error)
type CommitDeleteReq ¶ added in v0.7.0
type CommitDeleteReq struct {
CommitID string
}
CommitDeleteReq is the request for deleting a commit.
type CommitParentsReq ¶ added in v0.7.0
type CommitParentsReq struct {
CommitID string
}
CommitParentsReq is the request for listing parent commits.
type CommitUpdateReq ¶ added in v0.7.0
CommitUpdateReq is the request for updating a commit.
type CommitsListReq ¶ added in v0.7.0
type CommitsListReq struct {
Public bool
}
CommitsListReq is the request for listing commits.
type ConnectReq ¶
type ConnectReq struct{ Target string }
type ExecuteReq ¶
type KillDTO ¶
type KillDTO struct {
Scope string `json:"scope"`
Targets []string `json:"targets"`
DeletedIDs []string `json:"deleted_ids,omitempty"`
AffectedHead bool `json:"affected_head,omitempty"`
}
KillDTO is a structured summary suitable for MCP outputs.
type RunCommitReq ¶
type StatusReq ¶
type StatusReq struct {
Target string // optional VM identifier; if set, show VM
}
StatusReq captures the parsed flags/args from the status command.
type TagCreateReq ¶ added in v0.7.0
TagCreateReq is the request for creating a tag.
type TagDeleteReq ¶ added in v0.7.0
type TagDeleteReq struct {
TagName string
}
TagDeleteReq is the request for deleting a tag.
type TagGetReq ¶ added in v0.7.0
type TagGetReq struct {
TagName string
}
TagGetReq is the request for getting a tag.
type TagListReq ¶ added in v0.7.0
type TagListReq struct{}
TagListReq is the request for listing tags.
type TagUpdateReq ¶ added in v0.7.0
TagUpdateReq is the request for updating a tag.
type TunnelReq ¶ added in v0.6.0
type TunnelReq struct {
Target string // VM ID, alias, or empty for HEAD
LocalPort int // local port to listen on (0 = auto)
RemoteHost string // remote host (from the VM's perspective), default "localhost"
RemotePort int // remote port to forward to
}
TunnelReq holds the parameters for a tunnel command.