cmd

package
v0.0.0-...-6189669 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: GPL-3.0 Imports: 68 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobStatusCompleted = "completed"
	JobStatusFailed    = "failed"
	JobStatusPending   = "pending"
	JobStatusRunning   = "running"
)

Job status constants to avoid using magic strings.

Variables

This section is empty.

Functions

func ExecuteContext

func ExecuteContext(ctx context.Context) error

ExecuteContext adds all child commands to the root command and sets flags appropriately. It accepts a context that will be available to all commands via cmd.Context() for cancellation and timeouts. This is called by main.main() and only needs to happen once to the rootCmd. Returns an error if command execution fails.

func GetRootCommand

func GetRootCommand() *cobra.Command

GetRootCommand returns the root command for use with fang.Execute

func InstallOrRegenerateCompletion

func InstallOrRegenerateCompletion(shellName, targetPath string, generateFunc func(string) error) error

InstallOrRegenerateCompletion installs or regenerates a completion file This is used by the update command to auto-install or update completions

func RegenerateCompletion

func RegenerateCompletion(shellName, targetPath string, generateFunc func(string) error) error

RegenerateCompletion regenerates a completion file if it exists This is used by the update command to keep completions in sync

Types

type ConfigItem

type ConfigItem struct {
	// contains filtered or unexported fields
}

ConfigItem represents a configuration file option

func (ConfigItem) Description

func (i ConfigItem) Description() string

Description returns the description for the list item

func (ConfigItem) FilterValue

func (i ConfigItem) FilterValue() string

FilterValue returns the filter value for the list item

func (ConfigItem) Title

func (i ConfigItem) Title() string

Title returns the title for the list item

type ConfigSelectorModel

type ConfigSelectorModel struct {
	// contains filtered or unexported fields
}

ConfigSelectorModel represents the bubbletea model for selecting configuration files

func (ConfigSelectorModel) Init

func (m ConfigSelectorModel) Init() tea.Cmd

func (ConfigSelectorModel) Update

func (m ConfigSelectorModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ConfigSelectorModel) View

func (m ConfigSelectorModel) View() tea.View

type JobResponse

type JobResponse struct {
	JobID string `json:"job_id"`
}

JobResponse represents the JSON response containing a job identifier.

type SaltboxProxySource

type SaltboxProxySource struct {
	// contains filtered or unexported fields
}

SaltboxProxySource implements the go-selfupdate Source interface to route GitHub API calls through the Saltbox version proxy

func NewSaltboxProxySource

func NewSaltboxProxySource(proxyBaseURL string, verbose bool) (*SaltboxProxySource, error)

NewSaltboxProxySource creates a new Saltbox proxy source

func (*SaltboxProxySource) DownloadReleaseAsset

func (s *SaltboxProxySource) DownloadReleaseAsset(ctx context.Context, rel *selfupdate.Release, assetID int64) (io.ReadCloser, error)

DownloadReleaseAsset downloads the actual release asset Note: This downloads directly, not through the proxy

func (*SaltboxProxySource) ListReleases

func (s *SaltboxProxySource) ListReleases(ctx context.Context, repository selfupdate.Repository) ([]selfupdate.SourceRelease, error)

ListReleases fetches releases through the Saltbox proxy, then falls back to direct GitHub API if needed.

type StatusResponse

type StatusResponse struct {
	Status string `json:"status"`
}

StatusResponse represents the JSON response that includes the current job status.

Jump to

Keyboard shortcuts

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