tui

package
v0.0.0-...-8dd3885 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureInt

func EnsureInt(t string, l rune) bool

Types

type CLI

type CLI struct {
	CompletedConfig
	App  *tview.Application
	Root *tview.Flex
	Me   *apis.User
}

func New

func New(cfg CompletedConfig) (*CLI, error)

type Common

type Common struct {
	Client client.Client
	Log    logr.Logger
}

type CompletedConfig

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

CompletedConfig can be constructed only from Config.Complete

type Config

type Config struct {
	Options *Options
	Auth    *auth.Config

	Common
}

func NewConfig

func NewConfig(o *Options, log logr.Logger) *Config

func (*Config) Complete

func (c *Config) Complete() (CompletedConfig, error)

type KeyBinding

type KeyBinding struct {
	Key         string
	Description string
}

type Options

type Options struct {
	Auth           *auth.Options `mapstructure:"auth"`
	Address        string        `mapstructure:"addr"`
	InsecureClient bool          `mapstructure:"insecure-client"`
}

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

func (*Options) Complete

func (o *Options) Complete() error

func (*Options) Validate

func (o *Options) Validate() []error

type TaskModel

type TaskModel struct {
	*apis.Task
	LastTouched bool
}

type TaskTable

type TaskTable struct {
	*tview.Table
	CLI   *CLI
	Tasks []TaskModel
}

func NewTaskTable

func NewTaskTable(c *CLI, tasks []apis.Task) *TaskTable

func (*TaskTable) Remove

func (t *TaskTable) Remove(task *apis.Task) error

func (*TaskTable) SetTasks

func (t *TaskTable) SetTasks(tasks []apis.Task)

func (*TaskTable) Update

func (t *TaskTable) Update(clear bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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