Documentation
¶
Index ¶
- Constants
- func EditTextInputField(msg tea.KeyMsg, input string, cursor int) (string, int)
- func IsEnterKey(msg tea.KeyMsg) bool
- func IsQuitKey(msg tea.KeyMsg) bool
- func ProcessListCursor(msg tea.KeyMsg, cursor, listLength int) int
- func RenderInputPrompt(prompt, defaultText, currentText, errorMsg string) string
- func RenderListPrompt(header string, items []string, cursor int) string
- func RunInteractiveModel(model tea.Model) (tea.Model, error)
- type BaseModel
- func (b *BaseModel) FetchBuildNames() ([]string, error)
- func (b *BaseModel) FetchComponents() ([]string, error)
- func (b *BaseModel) FetchDataPlanes() ([]string, error)
- func (b *BaseModel) FetchDeployableArtifacts() ([]string, error)
- func (b *BaseModel) FetchDeploymentTracks() ([]string, error)
- func (b *BaseModel) FetchDeployments() ([]string, error)
- func (b *BaseModel) FetchEnvironments() ([]string, error)
- func (b *BaseModel) FetchProjects() ([]string, error)
- func (b BaseModel) RenderComponentSelection() string
- func (b BaseModel) RenderDeployableArtifactSelection() string
- func (b BaseModel) RenderDeploymentTrackSelection() string
- func (b BaseModel) RenderEnvironmentSelection() string
- func (b BaseModel) RenderOrgSelection() string
- func (b BaseModel) RenderProgress() string
- func (b BaseModel) RenderProjSelection() string
- func (b *BaseModel) UpdateOrgSelect(keyMsg tea.KeyMsg) tea.Cmd
- func (b *BaseModel) UpdateProjSelect(keyMsg tea.KeyMsg) (tea.Cmd, error)
Constants ¶
const ( StateOrgSelect = iota StateProjSelect StateCompSelect )
Variables ¶
This section is empty.
Functions ¶
func EditTextInputField ¶
func IsEnterKey ¶
func RenderInputPrompt ¶
Types ¶
type BaseModel ¶
type BaseModel struct {
Organizations []string
OrgCursor int
Projects []string
ProjCursor int
Components []string
CompCursor int
Environments []string
EnvCursor int
DeploymentTracks []string
DeploymentTrackCursor int
DeployableArtifacts []string
DeployableArtifactCursor int
ErrorMsg string
State int
}
BaseModel holds the shared state for interactive models.
func NewBaseModel ¶
func (*BaseModel) FetchBuildNames ¶
FetchBuildNames retrieves build names based on the current selections.
func (*BaseModel) FetchComponents ¶
FetchComponents retrieves component names for the currently selected organization and project.
func (*BaseModel) FetchDataPlanes ¶
FetchDataPlanes retrieves data plane names for the currently selected organization.
func (*BaseModel) FetchDeployableArtifacts ¶
FetchDeployableArtifacts retrieves deployable artifact names based on the current selections.
func (*BaseModel) FetchDeploymentTracks ¶
FetchDeploymentTracks retrieves deployment track names based on the current selections.
func (*BaseModel) FetchDeployments ¶
FetchDeployments retrieves deployment names based on the current selections.
func (*BaseModel) FetchEnvironments ¶
FetchEnvironments retrieves environment names for the currently selected organization.
func (*BaseModel) FetchProjects ¶
FetchProjects retrieves project names for the currently selected organization.
func (BaseModel) RenderComponentSelection ¶
RenderComponentSelection returns a prompt for component selection.
func (BaseModel) RenderDeployableArtifactSelection ¶
RenderDeployableArtifactSelection returns a prompt for deployable artifact selection.
func (BaseModel) RenderDeploymentTrackSelection ¶
RenderDeploymentTrackSelection returns a prompt for deployment track selection.
func (BaseModel) RenderEnvironmentSelection ¶
RenderEnvironmentSelection returns a prompt for environment selection.
func (BaseModel) RenderOrgSelection ¶
RenderOrgSelection returns a prompt for organization selection.
func (BaseModel) RenderProgress ¶
RenderProgress renders the selections made so far.
func (BaseModel) RenderProjSelection ¶
RenderProjSelection returns a prompt for project selection.
func (*BaseModel) UpdateOrgSelect ¶
UpdateOrgSelect handles organization selection. It fetches projects when Enter is pressed.