cmd

package
v0.0.0-...-704cf4e Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigurationsRelativeFileExtension = ".yaml"
View Source
var ConfigurationsRelativeFilePath = "./configurations"
View Source
var Resources = map[string]Resource{}

Functions

func GetAvailableResourceNames

func GetAvailableResourceNames() []string

func Init

func Init()

Types

type Command

type Command struct {
	Name           string   `yaml:"name"`
	ResourceName   string   `yaml:"resourceName"`
	DefaultCommand string   `yaml:"defaultCommand"`
	Arguments      []string `yaml:"arguments"`
	View           string   `yaml:"view"`
	Parse          Parse    `yaml:"parse"`
}

func (*Command) Run

func (command *Command) Run(resource string, profile string) string

type Parse

type Parse struct {
	Type          string `yaml:"type"`
	AttributeName string `yaml:"attributeName"`
}

type Resource

type Resource struct {
	Name           string    `yaml:"name"`
	DefaultCommand string    `yaml:"defaultCommand"`
	Commands       []Command `yaml:"commands"`
}

func (*Resource) GetCommand

func (resource *Resource) GetCommand(name string) Command

func (*Resource) GetCommandNames

func (resource *Resource) GetCommandNames() []string

type UIState

type UIState struct {
	Profile           string            `yaml:"profile"`
	Resource          Resource          `yaml:"resource"`
	Command           Command           `yaml:"command"`
	SelectedItems     map[string]string `yaml:"selectedItems"`
	CommandBarVisible bool              `yaml:"commandBarVisible"`
	Breadcrumbs       []string          `yaml:"breadcrumbs"`
}
var UiState UIState = UIState{SelectedItems: make(map[string]string), Breadcrumbs: []string{}}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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