output

package
v1.2.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandWrapper

type CommandWrapper struct{}

func NewCommandWrapper

func NewCommandWrapper() *CommandWrapper

func (*CommandWrapper) RenderMessage

func (p *CommandWrapper) RenderMessage(_, output string, _ *state.Container, msgCtx *template.Template) (api.Message, error)

type Parser

type Parser interface {
	TableSeparated(in string) parser.TableOutput
}

Parser defines

type TableCommandParser

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

TableCommandParser allows to render table command output into interactive message based on registered templates.

func NewTableCommandParser

func NewTableCommandParser(log logrus.FieldLogger) *TableCommandParser

NewTableCommandParser returns a new TableCommandParser instance.

func (*TableCommandParser) RenderMessage

func (p *TableCommandParser) RenderMessage(cmd, output string, state *state.Container, msgCtx *template.Template) (api.Message, error)

RenderMessage renders the output string based on a given template.

type TutorialWrapper

type TutorialWrapper struct{}

TutorialWrapper allows constructing interactive message with predefined steps.

func NewTutorialWrapper

func NewTutorialWrapper() *TutorialWrapper

NewTutorialWrapper returns a new TutorialWrapper instance.

func (*TutorialWrapper) RenderMessage

func (p *TutorialWrapper) RenderMessage(cmd, _ string, _ *state.Container, msgCtx *template.Template) (api.Message, error)

RenderMessage returns interactive message with predefined steps.

Jump to

Keyboard shortcuts

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