history

package
v0.24.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct {
	ConfigPath string
	Items      []string
	Item       string
	Prompt     []PromptItem
	PromptItem PromptItem
}

History contains the history path, binary name and history items.

func SetPath

func SetPath(path string) *History

SetPath set History path

func (*History) List

func (h *History) List() *History

List History records order by Ascending

func (*History) Load

func (h *History) Load() *History

Load the history record

func (*History) Reverse

func (h *History) Reverse() *History

Reverse History records order by Descending

func (*History) Select

func (h *History) Select() *History

Select one History item from history

type Prompt

type Prompt struct {
	Items []PromptItem
}

Prompt struct

type PromptItem

type PromptItem struct {
	Cmd       string `json:"cmd,omitempty"`
	Garden    string `json:"garden,omitempty"`
	Project   string `json:"project,omitempty"`
	Seed      string `json:"seed,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	Shoot     string `json:"shoot,omitempty"`
}

PromptItem struct

func PromptItems

func PromptItems(load []string) []PromptItem

PromptItems generate prompt items

Jump to

Keyboard shortcuts

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