cmdr

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GreenTemplate = "\033[1;32m%s\033[0m"
	RedTemplate   = "\033[1;31m%s\033[0m"
	ChartRepoHost = "https://alfiankan.github.io/commander-charts/charts"
	ChartTemplate = `` /* 770-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart struct {
	Usage  string        `json:"usage"`
	Cmdt   string        `json:"cmdt"`
	Type   string        `json:"type"`
	Prompt []ChartPrompt `json:"prompt,omitempty"`
}

type ChartItem

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

func (ChartItem) Description

func (i ChartItem) Description() string

func (ChartItem) FilterValue

func (i ChartItem) FilterValue() string

func (ChartItem) Title

func (i ChartItem) Title() string

type ChartPrompt

type ChartPrompt struct {
	Tmplt        string `json:"tmplt"`
	Label        string `json:"label"`
	Kind         string `json:"kind"`
	DefaultValue string `json:"default"`
}

type CmdrChart

type CmdrChart struct {
	Kind        string  `json:"kind"`
	Description string  `json:"description"`
	Charts      []Chart `json:"charts"`
}

type CmdrFinished

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

type CmdrTuiViewModel

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

func NewCmdrTUI

func NewCmdrTUI(chartsFilePath, unixshell string) CmdrTuiViewModel

func (CmdrTuiViewModel) Init

func (m CmdrTuiViewModel) Init() tea.Cmd

func (CmdrTuiViewModel) Update

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

func (CmdrTuiViewModel) View

func (m CmdrTuiViewModel) View() string

type EditorTuiViewModel

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

func NewEditorTUI

func NewEditorTUI(chartFilePath, editor string) EditorTuiViewModel

func (EditorTuiViewModel) Init

func (m EditorTuiViewModel) Init() tea.Cmd

func (EditorTuiViewModel) Update

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

func (EditorTuiViewModel) View

func (m EditorTuiViewModel) View() string

Jump to

Keyboard shortcuts

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